Dec 7, 2018


pacman --help show available switches ( basic)


sudo pacman -Syu upgrade the entire system

-S - synchronize packages

-y - refresh

-u - upgrades all packages that are out-of-date


sudo pacman -S <package-name> install a package


sudo pacman -R <package-name> remove package

sudo pacman -Rs <package-name> remove package and package’s dependencies (it

will not remove dependencies that are needed by other applications)


pacman -Ss <package-name> search for packages by name on remote repositories

pacman -Qs <package-name> search the local machine for installed package


pactree <package-name>  view the dependant tree of a package, pass the reverse
                                                   flag -r to pactree, or use whoneeds from pkgtoolsAUR. 

pacman -Qdt    list all packages no longer required as dependencies (orphans)

Removing unused packages (orphans)

For recursively removing orphans and their configuration files:

sudo pacman -Rns $(pacman -Qtdq)

If no orphans were found pacman outputs error: no targets specified. This is expected as no arguments were passed to pacman -Rns.

Note: The arguments -Qt list only true orphans. To include packages which are optionally required by another package, pass the -t flag twice (i.e., -Qtt).



pacman tips and tricks:


Archlinux pacman wikipedia: