Pacman Cheat Sheet

From WikiOD

Here is the cheatsheat of Pacman and basic guide on how to use Pacman

Commands[edit | edit source]

{: .-three-column}

Common commands[edit | edit source]

Command Description
pacman -Syu <pkg> Install (and update package list)
pacman -S <pkg> Install only
pacman -Rsc <pkg> Uninstall
pacman -Ss <keywords> Search
pacman -Syu Upgrade everything

{: .-prime}

Query[edit | edit source]

Command Description
pacman -Qe List explictly-installed packages
pacman -Ql <pkg> What files does this package have?
pacman -Qii <pkg> List information on package
pacman -Qo <file> Who owns this file?
pacman -Qs <query> Search installed packages for keywords

Orphans[edit | edit source]

Command Description
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[edit | edit source]

Command Description
pactree <pkg> What does pkg depend on?
pactree -r <pkg> What depends on pkg?

References[edit | edit source]