1
0
mirror of https://github.com/onkelbeh/cheatsheets.git synced 2025-06-16 07:07:37 +02:00
cheatsheets/pacman.md
2023-03-14 12:52:21 +11:00

2.1 KiB

title category updated layout
Pacman Linux 2018-07-07 2017/sheet

Commands

{: .-three-column}

About

{: .-intro}

Pacman is the package manager for Arch Linux and its derivatives.

Common commands

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

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

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

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

References