Arch Linux pacman

ID

pacman

Links

Home page · Documentation · Repository · Wikipedia

Upstream stars

⭐ 66

Last commit

2026-01-25

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

📦 manager: pacman-based

Source

pacman.py

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 AUR helpers Aura, Pacaur, Paru, Pikaur, Trizen and Yay subclass it, reusing its parsers and overriding the binary and the version probe; each class docstring names what else differs. DkpPacman is pacman itself, built for devkitPro’s repositories.

Command equivalences with other managers are listed in Pacman/Rosetta.

What mpm adds to pacman

Through mpm, pacman gains:

  • a one-command cleanup --orphans that removes every orphaned dependency at once

  • --extended search, to match against package descriptions

Bigger still, mpm reaches across every manager at once: mpm installed and mpm outdated cover pacman alongside aura, dkp-pacman, pacaur, pamac, paru, pikaur, shelly, trizen, 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 pacman

With mpm

List what’s installed

pacman --query

mpm --pacman installed

List outdated packages

pacman --query --upgrades

mpm --pacman outdated

Search for a package

pacman --sync --search fire

mpm --pacman search fire

Install a package

sudo pacman --sync firefox

mpm install pkg:pacman/firefox

Upgrade one package

sudo pacman --sync firefox

mpm --pacman upgrade firefox

Upgrade everything

sudo pacman --sync --refresh --sysupgrade

mpm --pacman upgrade --all

Remove a package

sudo pacman --remove firefox

mpm remove pkg:pacman/firefox

List orphaned dependencies

pacman --query --deps --unrequired

mpm --pacman orphans

Clear caches

sudo pacman --sync --clean --clean

mpm --pacman cleanup --cache

Run health checks

pacman --database --check

mpm --pacman doctor

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

installed

✅

outdated

✅

Only packages tracked in a sync database are reported; foreign packages (AUR builds, -U installs) stay invisible to the plain pacman binary.

orphans

✅

search

✅

Extended search backfilled by mpm.

install

✅

A package already installed as a dependency is marked explicit by mpm.

upgrade

✅

upgrade_all

✅

remove

✅

The --orphans flag also drops the package’s orphaned dependencies.

sync

✅

cleanup

✅

The --orphans sweep is backfilled by mpm.

doctor

✅

Configuration

  • Ignore pacman on the mpm CLI by passing the --no-pacman option.

  • Ignore it for every run in your configuration:

    [mpm]
    pacman = false
    
  • Raise the timeout of all pacman calls:

    [mpm.overrides.pacman]
    timeout = 900
    
  • Run mpm config-template pacman to print all overridable settings for your configuration file:

    [mpm.overrides.pacman]
    cli_names = [
        "pacman",
    ]
    cli_search_path = []
    dry_run = false
    ignore_auto_updates = true
    plan = false
    post_args = []
    pre_args = [
        "--noconfirm",
        "--color",
        "never",
    ]
    pre_cmds = []
    requirement = ">=5.0.0"
    stop_on_error = false
    unmaintained = false
    version_cli_options = [
        "--version",
    ]
    version_regexes = [
        ".*Pacman\\s+v(?P<version>\\S+)",
    ]
    

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.

Recipes

A few jobs you would otherwise script around pacman, one mpm command each:

  • Snapshot and clone a machine: mpm --pacman dump pacman.toml, then mpm restore pacman.toml on the next one.

  • Export a compliance SBOM: mpm --pacman sbom (CycloneDX by default, --spdx for SPDX).

  • Gate CI on health: mpm --pacman doctor relays 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.

Its privileged operations are cleanup, install, remove, sync, upgrade, upgrade_all.

See privilege escalation for the full policy.

Concurrency

mpm never runs pacman at the same time as aura, pacaur, pamac, paru, pikaur, trizen or yay: they all reach the pacman database (/var/lib/pacman/db.lck), and two of them mutating at once fail to init their transaction. Each mutating operation waits for the previous one, even with a higher --jobs, while managers outside this group keep running in parallel.

Only mutations are held back. The read-only queries (installed, outdated, search) take no backend lock and stay fully concurrent.

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 against ftp.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); --cooldown best-effort opts back in.

Reference traces

A collection of raw native outputs captured from the manager’s own CLI and recorded in the manager source. 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 --color never --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 --color never --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

Version check

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+)"

Upstream project

Metrics

pacman/pacman

Activity

open issues open merge requests

Popularity

forks contributors

Metadata

latest tag license

Changelog

  • 8.0.0 (2026-09-20)

    • Mark a package already installed as a dependency as explicitly installed when mpm install or mpm restore names it, so mpm cleanup --orphans keeps it.

    • Stop running the AUR helpers concurrently with pacman and with each other, all of them driving the same pacman database.

    • Correct the commands shown on each manager’s page, which named fewer options than mpm actually runs.

  • 7.4.0 (2026-07-25)

    • sync now escalates through sudo like its other write commands: refreshing the sync databases writes root-owned state.

  • 6.2.0 (2026-03-25)

    • Add --color never option to all invocations.

  • 5.6.0 (2022-09-26)

    • Fix pacman install operation. Closes #766.

  • 5.3.0 (2022-06-25)

    • Run install, upgrade, remove and cleanup operations with sudo.

  • 5.2.0 (2022-06-16)

    • Add remove operation.

  • 4.13.0 (2022-04-16)

    • Add support for pacman. Closes #416.