Package management on Arch Linux
pacman
Installing packages
pacman -S package # Install a package
pacman -Syu # Upgrade packages
Listing packages
pacman -Q # all packages
pacman -Qe # explicited installed
pacman -Qm # extra packages. e.g. packages installed from the aur
pacman -Qdt # orphans
pacman -Qk # number of files per package
pacman -Qo file # packages that own a file
Removing packages
pacman -R package # Remove a package
pacman -Qdtq | sudo pacman -R - # Remove all orphans
Cleaning the pacman
cache
pacman -Sc # remove only packages that are not currently installed
pacman -Scc # remove also currently installed packages
Searching for packages
pacman -Ss package
aura
Installing packages
pacman -A package # Install a package from the AUR
pacman -Ayu # Upgrade packages from the AUR
Inspecting PKGBUILD
scripts
aura -Ap package # Print a PKGBUILD
aura -Ap package | bat -l=bash # Add syntax highlighting using bat
Resources