m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Chrzanowski <m@m-chrzan.xyz>2023-06-18 01:21:29 +0200
committerMarcin Chrzanowski <m@m-chrzan.xyz>2023-06-18 01:21:29 +0200
commit8db42981047c880c25a291324a3cd064dc601c36 (patch)
treeab1c7170f95ef58eb2b37da52ab953d4e3d7a261
parent188c9cff006093f656cb69b02af2317eaeeb628e (diff)
Add pacman debloating instructions and tips
-rw-r--r--pacman.md20
1 files changed, 13 insertions, 7 deletions
diff --git a/pacman.md b/pacman.md
index 3a5434d..e6d8cd0 100644
--- a/pacman.md
+++ b/pacman.md
@@ -4,7 +4,9 @@
pacman -U /var/cache/pacman/pkg/package-version...
-## Cleaning cache
+## Debloating
+
+### Cleaning cache
paccache -r
@@ -14,6 +16,14 @@
# remove all versions of uninstalled packages
paccache -ruk0
+### Removing orphaned packages
+
+ pacman -Qtdq | pacman -Rns -
+
+### List packages by size
+
+ LC_ALL=C pacman -Qi | awk '/^Name/{name=$3} /^Installed Size/{print $4$5, name}' | sort -h
+
## Troubleshooting failed installations
Usually enough to update keyring:
@@ -31,10 +41,6 @@ there and remove the .pacnew suffix)
By itself, outputs all installed packages.
-List packages by size:
+## Browsing installed packages with `fzf`
- 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
+ pacman -Qq | fzf --preview 'pacman -Qil {}' --layout=reverse --bind 'enter:execute(pacman -Qil {} | less)'