Package Management

pacman

Package manager for Arch Linux and derivatives.

Synopsis

syntax
pacman [OPTION]... [TARGET]...

Examples

Full system upgrade
sudo pacman -Syu
Install a package
sudo pacman -S firefox
Search for Docker packages
pacman -Ss docker
List files owned by package
pacman -Ql nginx
Remove package and orphan deps
sudo pacman -Rs old-package

Common options

FlagDescription
-SSync / install packages
-RRemove packages
-QQuery installed packages
-SyuFull system upgrade
-SsSearch remote packages
-RsRemove package and unneeded deps

About pacman

The `pacman` command package manager for Arch Linux and derivatives. Package management commands install, update, and remove software on Linux distributions.

Each distribution family has its own package manager — apt for Debian/Ubuntu, yum/dnf for RHEL/Fedora, pacman for Arch, and so on. Understanding your distro's package manager is one of the first steps in Linux administration.

The command accepts 6 commonly used flags shown above, though the full set of options is available in the man page (`man pacman`). The 5 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.

Related commands

More Package Management Commands

Other commands in the Package Management category

Related tools