Pacman cheatsheet

Common commands

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

Query

CommandDescription
pacman -QeList 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

CommandDescription
pacman -QdtList unneeded packages
pacman -Rns $(pacman -Qdtq)Uninstall unneeded packages

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

Other

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

References

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *