m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/pacman.md
diff options
context:
space:
mode:
Diffstat (limited to 'pacman.md')
-rw-r--r--pacman.md49
1 files changed, 48 insertions, 1 deletions
diff --git a/pacman.md b/pacman.md
index 5c0350f..133adfd 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
@@ -13,3 +15,48 @@
# 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:
+
+ pacman -Sy archlinux-keyring
+
+Might need to update mirrorlist first if outdated:
+
+ sudo pacman -Sy pacman-mirrorlist
+
+(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.
+
+### Browsing installed packages with `fzf`
+
+ pacman -Qq | fzf --preview 'pacman -Qil {}' --layout=reverse --bind 'enter:execute(pacman -Qil {} | less)'
+
+## Files (-F)
+
+Query the files database.
+
+Download/update database:
+
+ pacman -Fy
+
+Lists packages that contain `file`:
+
+ pacman -F <file>
+
+List files contained in `package`:
+
+ pacman -Fl <package>