Pacman - creationsoftre/Arch-Linux-wiki GitHub Wiki

Command

Install and update package list

pacman -Syu <pkg>

Install Only

pacman -S <pkg>

Uninstall

pacman -Rsc <pkg>

Search

pacman -Ss <pkg>

Upgrade everything

pacman -Syu <pkg>

Query

List explictly-installed packages

pacman -Qe

What files does this package have?

pacman -Ql <pkg>

List information on package

pacman -Qii <pkg>

Who owns this file?

pacman -Qo <file>

Search installed packages for keywords

pacman -Qs <query>

Orphans

List unneeded packages

pacman -Qdt

Uninstall unneeded packages

pacman -Rns $(pacman -Qdtq)

Avoid orphans by using pacman -Rsc to remove packages, which will remove unneeded dependencies.

Other

What does pkg depend on?

pactree <pkg>

What depends on pkg?

pactree -r <pkg>

⚠️ **GitHub.com Fallback** ⚠️