Arch Linux pacman

Arch Linux’s native package manager, covering the official repositories.

mpm forces --noconfirm and --color never on every call so pacman runs unattended and prints uncolored text the regexes can parse. Installed packages come from --query and upgradable ones from --query --upgrades; searches hit the sync databases via --sync --search.

The Pacaur, Paru and Yay subclasses are AUR helpers that reuse every parser and forced argument here unchanged, overriding only the binary (and, for yay, adding a release-age cooldown).

See command equivalences at: https://wiki.archlinux.org/title/Pacman/Rosetta.

Caution

--query --upgrades only reports updates for packages tracked in a sync database, so foreign packages (installed with pacman -U, as AUR helpers do) stay invisible to the base pacman binary. The subclasses escape this because their own binary also queries the AUR RPC. This upstream behavior is not confirmed on a live Arch box: see Pacman.outdated().

Platforms

  • 🅱️ BSD

  • 🐧 Linux

  • ⨂ Unix

Operations

Operation

Supported

Notes

installed

outdated

search

extended search backfilled by mpm

install

upgrade

upgrade_all

remove

sync

cleanup

Ecosystem

  • Accepted purl types: pkg:alpm, pkg:pacman

Usage

$ mpm --pacman installed
$ mpm --pacman search "query"
$ mpm --pacman upgrade --all
$ mpm install pkg:pacman/hello
$ mpm --dry-run --pacman upgrade --all

Every example above accepts --dry-run, which simulates the underlying manager calls without touching the system: the safe way to watch what mpm would do before trusting it.

Deselect the manager for a single run with --no-pacman, disable it from your configuration, or tune its invocation attributes with per-manager overrides.

Command line

  • CLI names, in lookup order: pacman

  • Arguments forced before each call: --noconfirm --color never

The version is probed by running:

$ pacman --version
 .--.                  Pacman v6.0.1 - libalpm v13.0.1
/ _.-' .-.  .-.  .-.   Copyright (C) 2006-2021 Pacman Development Team
\  '-. '-'  '-'  '-'   Copyright (C) 2002-2006 Judd Vinet
 '--'
                    This program may be freely redistributed under
                    the terms of the GNU General Public License.

and extracted with:

r".*Pacman\s+v(?P<version>\S+)"

Privilege escalation

System-wide manager: mpm wraps its privileged operations in sudo out of the box. Instead of letting the tool prompt mid-run, mpm primes the credential cache up-front, with a single branded password prompt at most. Turn escalation off for rootless setups with --no-sudo or the per-manager sudo override.

See privilege escalation for the full policy.

Cooldown

State of Arch Linux pacman’s release-age gating, from the cooldown support table:

  • Status: ❌ None

With --cooldown set, mpm skips this manager’s install and upgrade operations rather than run them unguarded (fail-closed); --allow-unsupported-managers opts back in.

Reference traces

Raw native outputs captured in the manager source: the reference mpm’s parsers were written against. If you know Arch Linux pacman well and a transcript below looks wrong, or a newer release changed its output format, report it.

$ pacman --noconfirm --query
a52dec 0.7.4-11
aalib 1.4rc5-14
abseil-cpp 20211102.0-2
accountsservice 22.08.8-2
acl 2.3.1-2
acme.sh 3.0.2-1
acpi 1.7-3
acpid 2.0.33-1
$ pacman --noconfirm --query --upgrades
linux 4.19.1.arch1-1 -> 4.19.2.arch1-1
linux-headers 4.19.1.arch1-1 -> 4.19.2.arch1-1