Pacman - Cheat Sheet
Below are a list of convenient pacman commands:
pacman -S {pkg}
– install {pkg}pacman -Syu
– update package database and upgrade installed packagespacman -Sy
– update package databasepacman -Su
– upgrade installed packagespacman -Syy
– force update of package database even if recently updatedpacman -Syyuw
– download programs but leave them uninstalled (for manual install)pacman -Syu
– equivalent to Debiansudo apt-get update && sudo apt-get upgrade
pacman -F
– search for package that contains program named in argumentpacman -R {pkg}
remove package {pkg}pacman -Rs
– remove package as well as unneeded dependenciespacman -Rns
– remove package, dependencies, and system config files (recommended for all package uninstallations)pacman -Q
– display all installed packagespacman -Q | wc -l
– display total number of installed packages by counting lines of outputpacman -Qe
– display only packages explicitly installedpacman -Qeq
– display only names of explicitly installed packages, and not version numbers (“quiet”)pacman -Qn
– display only packages installed from main repositoriespacman -Qm
– display only packages installed from AURpacman -Qdt
display orphaned dependenciespacman -Ss
– search remote repository for packagepacman -Qs
– search local repository for packagepacman -Sc
– remove packages that are no longer installed from cache as well as unused sync databasespacman -Scc
– remove everything cached, useful if downloaded package is corrupted