Basic on pacman
Table of contents
Jump to section titled: Table of contentsPacman Commands Cheat Sheet
Jump to section titled: Pacman Commands Cheat SheetPacman is the package manager for Arch Linux and its derivatives. It is used for package management, installation, and removal.
Update Package Lists
Jump to section titled: Update Package Listssudo pacman -Sy
-Sy
: Synchronizes the package databases.
Upgrade All Packages
Jump to section titled: Upgrade All Packages
sudo pacman -Syu
-Syu
:Synchronizes databases and upgrades all installed packages to their latest versions.
A Package
Jump to section titled: A PackageInstall
Jump to section titled: Installsudo pacman -S package_name
-S
: install a package
Remove
Jump to section titled: Removea Package
Jump to section titled: a Packagesudo pacman -R package_name
-R
: Remove a package_name
its Dependencies
Jump to section titled: its Dependenciessudo pacman -Rn package_name
its Dependencies, and Configuration Files
Jump to section titled: its Dependencies, and Configuration Filessudo pacman -Rns package_name
Search for a Package
Jump to section titled: Search for a Packagepacman -Ss search_term
Display Information about a Package
Jump to section titled: Display Information about a Packagepacman -Qi package_name
List installed Packages
Jump to section titled: List installed Packagespacman -Q
pacman -Qn
pacman -Qm
Orphaned Packages
Jump to section titled: Orphaned PackagesList:
pacman -Qdtq
Remove
sudo pacman -Rns $(pacman -Qdtq)
Clean
Jump to section titled: CleanPackage cache
Jump to section titled: Package cachesudo pacman -Sc
-SC
: Removes old package versions from the cache.
All Package Cache
Jump to section titled: All Package Cachesudo pacman -Scc