Pacman
Arch Linux's package manager - simpler in structure than APT or DNF, built around a rolling-release model, with the community-run AUR as an unofficial layer for everything not in the official repos.
Pacman is Arch Linux's package manager (also used by Arch derivatives like
Manjaro and EndeavourOS). Unlike Debian/Ubuntu or Fedora/RHEL, Arch
doesn't separate a low-level and high-level tool the way dpkg/apt or
rpm/dnf do - pacman handles both package installation and dependency
resolution itself.
Everyday commands
sudo pacman -Syu # sync repo databases AND upgrade everything
sudo pacman -S nginx # install a package
sudo pacman -R nginx # remove a package, keep its config/dependencies
sudo pacman -Rs nginx # remove a package AND dependencies no longer needed
pacman -Ss "web server" # search the repositories
pacman -Qs nginx # search installed packages
pacman -Qi nginx # detailed info about an installed package
pacman -Ql nginx # list every file the package installed
Pacman's flags follow a consistent pattern once memorized: the capital
letter (S sync, R remove, Q query) picks the operation, lowercase
letters modify it (y refresh databases, u upgrade, s search or
include dependencies depending on context).
Always run -Syu together, as one command, never -Sy followed by a
separate -S <package> later - updating the package database without
immediately upgrading (called a "partial upgrade") is an unsupported state
on Arch and a well-known way to break dependency resolution.
Configuration
/etc/pacman.conf
Defines enabled repositories ([core], [extra], [multilib] for
32-bit compatibility packages) and general options like which mirrors to
use, configured separately in /etc/pacman.d/mirrorlist.
The rolling-release model
Arch has no versioned releases the way Ubuntu or Fedora do - every
pacman -Syu pulls whatever the current upstream package versions are,
continuously. This means the latest software, sooner, but also more
exposure to occasional breaking changes that a fixed-release distro would
have caught during a dedicated release cycle.
Because of this, checking the Arch news feed
(archlinux.org/news, or informant as a pacman hook that surfaces it
automatically) before a big update is a standard practice - some upgrades
require manual intervention (a config file format change, a mid-upgrade
package split) that pacman itself can't handle automatically, and skipping
the news is the most common way an Arch system update goes wrong.
The AUR
The Arch User Repository (AUR) hosts community-submitted build
scripts (PKGBUILD files) for software not packaged in Arch's official
repositories - not precompiled binaries, but recipes that pacman itself
cannot install directly. Pacman has no built-in AUR support; installing
from it means either building manually:
git clone https://aur.archlinux.org/some-package.git
cd some-package
makepkg -si
or using an AUR helper - a third-party wrapper that automates this,
most commonly yay or paru:
yay -S some-aur-package
AUR packages are user-submitted and not vetted the way official
repository packages are - read a PKGBUILD before trusting it with
makepkg -si, since it runs arbitrary shell code as part of the build.
See Building From Source for
what makepkg is actually automating underneath.