=== Pacman cheatsheet ===
source: [[ https://devhints.io/pacman ]]
== Common commands ==
pacman -Syu # Install (and update package list)
pacman -S # Install only
pacman -Rsc # Uninstall
pacman -Ss # Search
pacman -Syu # Upgrade everything
== Query ==
pacman -Qe # List explictly-installed packages
pacman -Ql # What files does this package have?
pacman -Qii # List information on package
pacman -Qo # Who owns this file?
pacman -Qs # Search installed packages for keywords
== Orphans ==
pacman -Qdt # List unneeded packages
pacman -Rns $(pacman -Qdtq) # Uninstall unneeded packages
Avoid orphans by using ''pacman -Rsc'' to remove packages, which will remove unneeded dependencies.
== Other ==
pactree # What does pkg depend on?
pactree -r # What depends on pkg?
=== Key problems ===
Things to try:
pacman-key --refresh-keys
pacman-key --list-keys
edit /etc/pacman.d/gnupg/gpg.conf
Re-initialize keyring:
rm -r /etc/pacman.d/gnupg
pacman-key --init
pacman-key --populate archlinux
pacman -S archlinux-keyring