From 8db42981047c880c25a291324a3cd064dc601c36 Mon Sep 17 00:00:00 2001 From: Marcin Chrzanowski Date: Sun, 18 Jun 2023 01:21:29 +0200 Subject: Add pacman debloating instructions and tips --- pacman.md | 20 +++++++++++++------- 1 file 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)' -- cgit v1.2.3