Arch Linux pacman¶
- ID
pacman- Home page
- Version requirement
>= 5
- Platforms
🅱️ BSD · 🐧 Linux · ⨂ Unix
- Operations
installed·outdated·orphans·search·install·upgrade·upgrade_all·remove·sync·cleanup·doctor- purl types
pkg:alpm·pkg:pacman- CLI name
pacman- Every call
pacman --noconfirm --color never <command>- Issues and PRs
- Source
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).
Command equivalences with other managers are listed in 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().
What mpm adds to pacman¶
Through mpm, pacman gains:
a one-command
cleanup --orphansthat removes every orphaned dependency at once--extendedsearch, to match against package descriptions
Bigger still, mpm reaches across every manager at once: mpm installed and mpm outdated cover pacman alongside pacaur, paru, yay and any other manager you run in one table, mpm upgrade --all updates them together, and mpm sbom exports the whole machine as one bill of materials.
Every mpm command also gains --dry-run and --plan previews, cross-scheme version comparison and purl identifiers. See manager augmentations for how each one is built.
Your pacman commands, in mpm¶
You already know pacman: each operation maps one-to-one onto mpm, in an interface shared by every manager.
To… |
With |
With |
|---|---|---|
List what’s installed |
|
|
List outdated packages |
|
|
Search for a package |
|
|
Install a package |
|
|
Upgrade one package |
|
|
Upgrade everything |
|
|
Remove a package |
|
|
List orphaned dependencies |
|
|
Clear caches |
|
|
Run health checks |
|
|
Prefix any command above with --dry-run to simulate the underlying manager calls without touching the system: the safe way to watch what mpm would do before trusting it.
Operations¶
Operation |
Supported |
Notes |
|---|---|---|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
extended search backfilled by |
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
Selecting and configuring pacman¶
Deselect pacman for a single run with --no-pacman, or persist the choice in your configuration:
[mpm]
pacman = false
The arguments and environment variables listed in the box atop this page are forced on every pacman call, so runs stay quiet, non-interactive and reproducible: the defaults you would set in CI anyway.
Keep it enabled but tune how mpm drives it with a per-manager override:
[mpm.managers.pacman]
timeout = 900
mpm config-template pacman prints every overridable attribute as a ready-to-paste block.
Recipes¶
A few jobs you would otherwise script around pacman, one mpm command each:
Snapshot and clone a machine:
mpm --pacman dump pacman.toml, thenmpm restore pacman.tomlon the next one.Export a compliance SBOM:
mpm --pacman sbom(CycloneDX by default,--spdxfor SPDX).Gate CI on health:
mpm --pacman doctorrelays Arch Linux pacman’s own diagnosis and exits non-zero on trouble.
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
A cooldown only pays off where a compromised release can be withdrawn while the clock runs, and can only be emulated where the registry dates its releases. From the retraction table:
Registry: Distro binary archives (
pkg:deb,pkg:rpm,pkg:alpm,pkg:apk)Retraction: Index revert: removal is an archive operation and the mirror is rebuilt without the package. Debian, for one, requires filing an
RM:bug againstftp.debian.org(developers-reference)Publish date: ❌ the version string is the distro maintainer’s build, carrying no upstream publication date
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.
Version probe¶
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+)"
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
$ pacman --noconfirm --color never --query --deps --unrequired
gtest 1.14.0-1
libwlroots 0.16.2-2
Feed any of these through mpm and the raw output becomes one uniform table, the same shape for every manager: filter it, project columns, or export it (mpm --pacman installed --output json, or csv, toml, yaml), each package carrying a purl and a version comparable across managers.
Changelog¶
7.4.0(2026-07-25)syncnow escalates throughsudolike its other write commands: refreshing the sync databases writes root-owned state.
6.2.0(2026-03-25)Add
--color neveroption to all invocations.
5.6.0(2022-09-26)Fix
pacmaninstall operation. Closes #766.
5.3.0(2022-06-25)Run
install,upgrade,removeandcleanupoperations withsudo.
5.2.0(2022-06-16)Add
removeoperation.
4.13.0(2022-04-16)Add support for
pacman. Closes #416.