Table of contents
Open Table of contents
Pacman Commands Cheat Sheet
Pacman is the package manager for Arch Linux and its derivatives. It is used for package management, installation, and removal.
Update Package Lists
sudo pacman -Sy
-Sy
: Synchronizes the package databases.
Upgrade All Packages
sudo pacman -Syu
-Syu
:Synchronizes databases and upgrades all installed packages to their latest versions.
A Package
Install
sudo pacman -S package_name
-S
: install a package
Remove
a Package
sudo pacman -R package_name
-R
: Remove a package_name
its Dependencies
sudo pacman -Rn package_name
its Dependencies, and Configuration Files
sudo pacman -Rns package_name
Search for a Package
pacman -Ss search_term
Display Information about a Package
pacman -Qi package_name
List installed Packages
pacman -Q
pacman -Qn
pacman -Qm
Orphaned Packages
List:
pacman -Qdtq
Remove
sudo pacman -Rns $(pacman -Qdtq)
Clean
Package cache
sudo pacman -Sc
-SC
: Removes old package versions from the cache.
All Package Cache
sudo pacman -Scc