pacman

Pacman Cheatsheet #

pacman is the package manager for Arch Linux and its derivatives. It is used for installing, updating, and managing software packages.

Basic Commands #

Command/OptionExampleDescription
pacman -S <package>pacman -S nginxInstall a package
pacman -R <package>pacman -R nginxRemove a package, but keep configuration files
pacman -Rns <package>pacman -Rns nginxRemove a package and its unused dependencies
pacman -U <file>pacman -U /path/to/package.pkg.tar.zstInstall a package from a local file
pacman -Qpacman -QList all installed packages
pacman -Qi <package>pacman -Qi nginxDisplay detailed information about an installed package
pacman -Ql <package>pacman -Ql nginxList all files installed by a package
pacman -Qdpacman -QdList all dependencies that are no longer needed

Package Database and Updates #

Command/OptionExampleDescription
pacman -Syupacman -SyuUpdate the system and all installed packages
pacman -Sy <package>pacman -Sy nginxSync the package database and install a package
pacman -Sccpacman -SccClean the package cache
pacman -Syypacman -SyyForce a refresh of all package databases

Searching and Querying #

Command/OptionExampleDescription
pacman -Ss <query>pacman -Ss nginxSearch for packages in the repositories
pacman -Sw <package>pacman -Sw nginxDownload a package without installing it
pacman -Qmpacman -QmList all packages that were installed explicitly, but are not in the repositories

Miscellaneous #

Command/OptionExampleDescription
pacman -Qk <package>pacman -Qk nginxVerify the integrity of installed files for a package
pacman -Qepacman -QeList all explicitly installed packages

This cheatsheet covers essential pacman commands and options for managing packages on Arch Linux and its derivatives.

pacman

Explore our comprehensive cheatsheets to enhance your knowledge and efficiency. Each cheatsheet provides detailed command options, examples, and descriptions to help you master various tools and technologies.