m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Chrzanowski <m@m-chrzan.xyz>2022-11-29 14:56:34 +0100
committerMarcin Chrzanowski <m@m-chrzan.xyz>2022-11-29 14:56:34 +0100
commita81690f0b6784809facaa41f8694d74d3df97157 (patch)
treec53e3d4dad96feeadf13bc0223a1b89bfe1f8cbf
parent704cfa71609b7768d27e61d6fc3e449a5c2dce2c (diff)
Add pacman size query
-rw-r--r--pacman.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/pacman.md b/pacman.md
index 45d101e..3a5434d 100644
--- a/pacman.md
+++ b/pacman.md
@@ -26,3 +26,15 @@ Might need to update mirrorlist first if outdated:
(this might put it in /etc/pacman.d/mirrorlist.pacnew, uncomment wanted mirrors
there and remove the .pacnew suffix)
+
+## Query (-Q)
+
+By itself, outputs all installed packages.
+
+List packages by size:
+
+ pacman -Qi | egrep '^(Name|Installed)' \
+ | cut -f2 -d':' | tr '\n' ' ' \
+ | sed 's/B/B\n/g' | sed -e 's/^\s\+//' \
+ | sed -e 's/ M/M/' -e 's/ K/K/' -e 's/ B/B/' \
+ | sort -hk 2