meta_package_manager.managers.pacman module

class meta_package_manager.managers.pacman.Pacman[source]

Bases: PackageManager

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().

Initialize cli_errors list.

name: str = 'Arch Linux pacman'

Return package manager’s common name.

Default value is based on class name.

homepage_url: str | None = 'https://wiki.archlinux.org/title/pacman'

Home page of the project, only used in documentation for reference.

Annotated so a subclass may drop the mark: DkpPacman is a pacman fork that Arch’s logo would misattribute.

platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='aix', name='IBM AIX'), Platform(id='almalinux', name='AlmaLinux'), Platform(id='alpine', name='Alpine Linux'), Platform(id='altlinux', name='ALT Linux'), Platform(id='amzn', name='Amazon Linux'), Platform(id='android', name='Android'), Platform(id='arch', name='Arch Linux'), Platform(id='buildroot', name='Buildroot'), Platform(id='cachyos', name='CachyOS'), Platform(id='centos', name='CentOS'), Platform(id='chromeos', name='ChromeOS'), Platform(id='clearlinux', name='Clear Linux OS'), Platform(id='cloudlinux', name='CloudLinux OS'), Platform(id='cygwin', name='Cygwin'), Platform(id='debian', name='Debian'), Platform(id='dragonfly_bsd', name='DragonFly BSD'), Platform(id='endeavouros', name='EndeavourOS'), Platform(id='exherbo', name='Exherbo Linux'), Platform(id='fedora', name='Fedora'), Platform(id='freebsd', name='FreeBSD'), Platform(id='generic_linux', name='Generic Linux'), Platform(id='gentoo', name='Gentoo Linux'), Platform(id='guix', name='Guix System'), Platform(id='haiku', name='Haiku'), Platform(id='hurd', name='GNU/Hurd'), Platform(id='ibm_powerkvm', name='IBM PowerKVM'), Platform(id='illumos', name='illumos'), Platform(id='kali', name='Kali Linux'), Platform(id='kvmibm', name='KVM for IBM z Systems'), Platform(id='linuxmint', name='Linux Mint'), Platform(id='mageia', name='Mageia'), Platform(id='mandriva', name='Mandriva Linux'), Platform(id='manjaro', name='Manjaro Linux'), Platform(id='midnightbsd', name='MidnightBSD'), Platform(id='netbsd', name='NetBSD'), Platform(id='nixos', name='NixOS'), Platform(id='nobara', name='Nobara'), Platform(id='openbsd', name='OpenBSD'), Platform(id='opensuse', name='openSUSE'), Platform(id='openwrt', name='OpenWrt'), Platform(id='oracle', name='Oracle Linux'), Platform(id='os400', name='IBM i'), Platform(id='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), Platform(id='pikaos', name='PikaOS'), Platform(id='raspbian', name='Raspbian'), Platform(id='rhel', name='RedHat Enterprise Linux'), Platform(id='rocky', name='Rocky Linux'), Platform(id='scientific', name='Scientific Linux'), Platform(id='slackware', name='Slackware'), Platform(id='sles', name='SUSE Linux Enterprise Server'), Platform(id='slitaz', name='SliTaz GNU/Linux'), Platform(id='solaris', name='Solaris'), Platform(id='sourcemage', name='Source Mage GNU/Linux'), Platform(id='sunos', name='SunOS'), Platform(id='tuxedo', name='Tuxedo OS'), Platform(id='ubuntu', name='Ubuntu'), Platform(id='ultramarine', name='Ultramarine'), Platform(id='void', name='Void Linux'), Platform(id='wsl1', name='Windows Subsystem for Linux v1'), Platform(id='wsl2', name='Windows Subsystem for Linux v2'), Platform(id='xenserver', name='XenServer')})

Annotated with the base class’s own union so a subclass may widen it: DkpPacman ships for macOS too.

default_sudo: bool = True

Built-in escalation default, used when sudo is None.

False on the base: most managers install into user-writable trees and never need root. The system package managers whose privileged operations require root (apt, dnf, pacman, zypper, …) set this to True so their build_cli(..., sudo=True) operations escalate out of the box, while staying switchable off through sudo (--no-sudo or config) for rootless setups.

requirement: str | None = '>=5.0.0'

Version requirement specifier.

Supports a comma-separated range of constraints (e.g. ">=1.20.0,<2.0.0"). A bare version string like "1.20.0" is treated as >=1.20.0.

Parsed by meta_package_manager.version.VersionRange.

Defaults to None, which deactivates version check entirely.

pre_args: tuple[str, ...] = ('--noconfirm', '--color', 'never')
version_regexes: tuple[str, ...] = ('.*Pacman\\s+v(?P<version>\\S+)',)

Search version right after the Pacman string.

$ 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.
property installed: Iterator[Package]

Fetch installed packages.

$ 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
property outdated: Iterator[Package]

Fetch outdated packages.

$ 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

Note

pacman --query --upgrades (-Qu) only reports updates for packages tracked in a sync database (official repos, plus any local repo configured in pacman.conf). Foreign packages, those installed with pacman -U as most AUR helpers do, are invisible to -Qu and surface only under -Qm.

The Pacaur, Paru and Yay subclasses inherit this method verbatim, yet still see AUR updates because their own binary’s -Qu additionally queries the AUR RPC for foreign packages. The per-subclass binary override is therefore load-bearing: routing these helpers through pacman directly would silently drop every AUR update from the results.

Caution

This follows upstream -Qu semantics but has not been confirmed on a live Arch box. Before relying on it, verify that yay --query --upgrades invoked through mpm actually surfaces a pending AUR update.

property orphans: Iterator[Package]

Fetch packages installed as dependencies that nothing requires anymore.

Same <name> <version> listing shape as installed(), narrowed by --deps --unrequired (-Qtd) to the orphan set.

$ pacman --noconfirm --color never --query --deps --unrequired
gtest 1.14.0-1
libwlroots 0.16.2-2
search(query, extended, exact)[source]

Fetch matching packages.

Caution

Search does not supports extended matching.

$ pacman --noconfirm --sync --search fire
extra/dump_syms 0.0.7-1
    Symbol dumper for Firefox
extra/firefox 99.0-1
    Standalone web browser from mozilla.org
extra/firefox-i18n-ach 99.0-1
    Acholi language pack for Firefox
extra/firefox-i18n-af 99.0-1
    Afrikaans language pack for Firefox
extra/firefox-i18n-an 99.0-1
    Aragonese language pack for Firefox
extra/firefox-i18n-ar 99.0-1
    Arabic language pack for Firefox
extra/firefox-i18n-ast 99.0-1
    Asturian language pack for Firefox
Return type:

Iterator[Package]

install(package_id, version=None)[source]

Install one package.

$ sudo pacman --noconfirm --color never --sync firefox
Return type:

str

upgrade_all_cli()[source]

Generates the CLI to upgrade the package provided as parameter.

$ sudo pacman --noconfirm --color never --sync --refresh --sysupgrade
Return type:

tuple[str, ...]

upgrade_one_cli(package_id, version=None)[source]

Generates the CLI to upgrade the package provided as parameter.

$ sudo pacman --noconfirm --color never --sync firefox
Return type:

tuple[str, ...]

remove(package_id)[source]

Removes a package.

$ sudo pacman --noconfirm --color never --remove firefox
Return type:

str

remove_orphan(package_id)[source]

Remove a package together with its now-orphaned dependencies.

--recursive (-s) additionally removes the dependencies the package pulled in that no other installed package needs.

$ sudo pacman --noconfirm --color never --remove --recursive firefox
Return type:

str

sync()[source]

Sync package metadata.

$ sudo pacman --noconfirm --color never --sync --refresh
Return type:

None

cleanup_cache()[source]

Removes things we don’t need anymore.

$ sudo pacman --noconfirm --color never --sync --clean --clean
Return type:

None

doctor_cli()[source]

Generates the CLI running the native self-diagnosis.

--database --check (-Dk) verifies the consistency of the local package database, silent and exit-0 when everything is fine.

$ pacman --noconfirm --color never --database --check
Return type:

tuple[str, ...]

cli_names: tuple[str, ...] = ('pacman',)

List of CLI names the package manager is known as.

This list of recognized CLI names is ordered by priority. That way we can influence the search of the right binary.

..hint::

This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

By default, this property’s value is derived from the manager’s ID (see the MetaPackageManager.__init__ method above).

id: str = 'pacman'

Package manager’s ID.

Derived by defaults from the lower-cased class name in which underscores _ are replaced by dashes -.

This ID must be unique among all package manager definitions and lower-case, as they’re used as feature flags for the mpm CLI.

virtual: bool = False

Should we expose the package manager to the user?

Virtual package manager are just skeleton classes used to factorize code among managers of the same family.

class meta_package_manager.managers.pacman.DkpPacman[source]

Bases: Pacman

devkitPro’s pacman fork, covering the console homebrew toolchains.

devkitPro ships its own pacman build under the dkp-pacman name so it can sit beside a distribution’s own pacman without colliding, pointed at the devkitPro repositories holding the devkitARM, devkitA64 and devkitPPC toolchains and the libraries built against them.

Every operation, parser and forced argument is inherited from Pacman unchanged: the fork tracks upstream closely enough that its version banner still comes from the same printf(" .--.    Pacman v%s - libalpm v%s") call, so the inherited Pacman.version_regexes reads it as-is.

Unlike the AUR helpers below this one is not a helper at all but pacman itself, so it keeps the default_sudo inherited from Pacman.

Documentation: devkitPro pacman.

Initialize cli_errors list.

id: str = 'dkp-pacman'

Package manager’s ID.

Derived by defaults from the lower-cased class name in which underscores _ are replaced by dashes -.

This ID must be unique among all package manager definitions and lower-case, as they’re used as feature flags for the mpm CLI.

name: str = 'devkitPro pacman'

Return package manager’s common name.

Default value is based on class name.

homepage_url: str | None = 'https://github.com/devkitPro/pacman'

Home page of the project, only used in documentation for reference.

No mark of its own, and Arch’s would misattribute a devkitPro tool: the manager page keeps the default package glyph instead.

platforms: frozenset[Platform] | Group | Platform | Iterable[Platform | Group] = frozenset({Platform(id='almalinux', name='AlmaLinux'), Platform(id='alpine', name='Alpine Linux'), Platform(id='altlinux', name='ALT Linux'), Platform(id='amzn', name='Amazon Linux'), Platform(id='android', name='Android'), Platform(id='arch', name='Arch Linux'), Platform(id='buildroot', name='Buildroot'), Platform(id='cachyos', name='CachyOS'), Platform(id='centos', name='CentOS'), Platform(id='chromeos', name='ChromeOS'), Platform(id='clearlinux', name='Clear Linux OS'), Platform(id='cloudlinux', name='CloudLinux OS'), Platform(id='debian', name='Debian'), Platform(id='endeavouros', name='EndeavourOS'), Platform(id='exherbo', name='Exherbo Linux'), Platform(id='fedora', name='Fedora'), Platform(id='generic_linux', name='Generic Linux'), Platform(id='gentoo', name='Gentoo Linux'), Platform(id='guix', name='Guix System'), Platform(id='ibm_powerkvm', name='IBM PowerKVM'), Platform(id='kali', name='Kali Linux'), Platform(id='kvmibm', name='KVM for IBM z Systems'), Platform(id='linuxmint', name='Linux Mint'), Platform(id='macos', name='macOS'), Platform(id='mageia', name='Mageia'), Platform(id='mandriva', name='Mandriva Linux'), Platform(id='manjaro', name='Manjaro Linux'), Platform(id='nixos', name='NixOS'), Platform(id='nobara', name='Nobara'), Platform(id='opensuse', name='openSUSE'), Platform(id='openwrt', name='OpenWrt'), Platform(id='oracle', name='Oracle Linux'), Platform(id='parallels', name='Parallels'), Platform(id='pidora', name='Pidora'), Platform(id='pikaos', name='PikaOS'), Platform(id='raspbian', name='Raspbian'), Platform(id='rhel', name='RedHat Enterprise Linux'), Platform(id='rocky', name='Rocky Linux'), Platform(id='scientific', name='Scientific Linux'), Platform(id='slackware', name='Slackware'), Platform(id='sles', name='SUSE Linux Enterprise Server'), Platform(id='slitaz', name='SliTaz GNU/Linux'), Platform(id='sourcemage', name='Source Mage GNU/Linux'), Platform(id='tuxedo', name='Tuxedo OS'), Platform(id='ubuntu', name='Ubuntu'), Platform(id='ultramarine', name='Ultramarine'), Platform(id='void', name='Void Linux'), Platform(id='wsl1', name='Windows Subsystem for Linux v1'), Platform(id='wsl2', name='Windows Subsystem for Linux v2'), Platform(id='xenserver', name='XenServer')})

devkitPro publishes dkp-pacman for Linux and for macOS, the latter through the devkitpro-pacman-installer.pkg of its releases. Its Windows path installs the toolchains through MSYS2’s own pacman instead, which is a different binary this manager does not claim.

requirement: str | None = '>=6.0.0'

The series aligned with upstream pacman 6, which every parser inherited here was written against. devkitPro’s own v1.0.x releases of 2020 predate that alignment and are excluded deliberately.

cli_names: tuple[str, ...] = ('dkp-pacman',)

The binary is deliberately prefixed upstream so it never shadows a distribution’s own pacman; the class name would otherwise resolve to dkppacman.

virtual: bool = False

Should we expose the package manager to the user?

Virtual package manager are just skeleton classes used to factorize code among managers of the same family.

class meta_package_manager.managers.pacman.Pacaur[source]

Bases: Pacman

AUR helper wrapping pacman, driven through the pacaur binary.

Inherits every operation, parser and forced argument from Pacman; only the binary and version probe differ. Routing through pacaur is what lets --query --upgrades report AUR updates on top of the official repositories.

Unlike pacman, the helper must run as the regular user: it aborts under root (you cannot perform this operation as root) because makepkg refuses to build as root, and it invokes sudo pacman itself for the privileged steps. mpm therefore never wraps it in sudo.

Initialize cli_errors list.

unmaintained: bool = True

A manager whose upstream project is no longer maintained.

Covers projects that are officially retired and those we infer are abandoned: archived on their forge, left without a release or commit for years, formally superseded by a successor, or part of a discontinued platform. See the stability policy in CLAUDE.md for the full criteria.

An unmaintained manager is hidden from package selection by default (you can still use it by explicitly calling for it on the command line), and is exempt from the project stability policy: it may be dropped, in part or in full, in any release and without notice, once keeping it working becomes too burdensome.

Unmaintained managers are kept out of the functional and integration test matrices, so an unreliable or flaky one never blocks a release and we save CI resources. The commitment is to keep the wrapper for as long as that stays cheap: the cheap static invariants (ID format, attribute ordering, …) still apply for as long as the manager’s code lives in the source tree, to keep that code valid.

Every unmaintained manager must document itself through unmaintained_message.

unmaintained_message: str | None = 'The [original pacaur repository is archived](https://github.com/rmarquis/pacaur) (last commit 2018) and the [E5ten fork](https://github.com/E5ten/pacaur) has had no commits since 2021; migrate to `paru` or `yay`.'

Evidence and rationale for the unmaintained flag, as a MyST markdown block.

Rendered into the documentation (the manager’s page, and a ⚠️ marker in the manager tables). May embed markdown links to the archival notice, the successor project, or the discontinuation announcement. Required for every manager whose unmaintained flag is set, and only meaningful on such managers. Enforced by test_unmaintained.

name: str = 'Arch Linux pacaur'

Return package manager’s common name.

Default value is based on class name.

homepage_url: str | None = 'https://github.com/E5ten/pacaur'

Home page of the project, only used in documentation for reference.

Annotated so a subclass may drop the mark: DkpPacman is a pacman fork that Arch’s logo would misattribute.

default_sudo: bool = False

pacaur aborts its sync-class operations under root and runs sudo pacman itself, so the escalation default inherited from Pacman must not wrap it.

internal_sudo: bool = True

pacaur calls sudo pacman from inside its own commands for the install, upgrade and removal steps.

requirement: str | None = '>=4.0.0'

Version requirement specifier.

Supports a comma-separated range of constraints (e.g. ">=1.20.0,<2.0.0"). A bare version string like "1.20.0" is treated as >=1.20.0.

Parsed by meta_package_manager.version.VersionRange.

Defaults to None, which deactivates version check entirely.

version_regexes: tuple[str, ...] = ('pacaur\\s+(?P<version>\\S+)',)

Search version right after the pacaur string.

$ pacaur --version
pacaur 4.8.6
cli_names: tuple[str, ...] = ('pacaur',)

List of CLI names the package manager is known as.

This list of recognized CLI names is ordered by priority. That way we can influence the search of the right binary.

..hint::

This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

By default, this property’s value is derived from the manager’s ID (see the MetaPackageManager.__init__ method above).

id: str = 'pacaur'

Package manager’s ID.

Derived by defaults from the lower-cased class name in which underscores _ are replaced by dashes -.

This ID must be unique among all package manager definitions and lower-case, as they’re used as feature flags for the mpm CLI.

virtual: bool = False

Should we expose the package manager to the user?

Virtual package manager are just skeleton classes used to factorize code among managers of the same family.

class meta_package_manager.managers.pacman.Paru[source]

Bases: Pacman

AUR helper wrapping pacman, driven through the paru binary.

Inherits every operation, parser and forced argument from Pacman; only the binary and version probe differ. Its own --query --upgrades reports AUR updates on top of the official repositories. The >=1.9.3 floor is the first paru release to implement --sysupgrade, the flag the inherited upgrade_all_cli builds.

Unlike pacman, the helper must run as the regular user: any transaction building AUR packages aborts under root (can’t install AUR package as root`), and paru invokes``sudo pacman` itself for the privileged steps. mpm therefore never wraps it in sudo.

Initialize cli_errors list.

name: str = 'Arch Linux paru'

Return package manager’s common name.

Default value is based on class name.

homepage_url: str | None = 'https://github.com/Morganamilo/paru'

Home page of the project, only used in documentation for reference.

Annotated so a subclass may drop the mark: DkpPacman is a pacman fork that Arch’s logo would misattribute.

default_sudo: bool = False

paru refuses to build AUR packages under root and runs sudo pacman itself, so the escalation default inherited from Pacman must not wrap it.

internal_sudo: bool = True

paru calls sudo from inside its own commands (the Sudo/SudoFlags settings of paru.conf) for the install, upgrade and removal steps.

requirement: str | None = '>=1.9.3'

Version requirement specifier.

Supports a comma-separated range of constraints (e.g. ">=1.20.0,<2.0.0"). A bare version string like "1.20.0" is treated as >=1.20.0.

Parsed by meta_package_manager.version.VersionRange.

Defaults to None, which deactivates version check entirely.

version_regexes: tuple[str, ...] = ('paru\\s+v(?P<version>\\S+)',)

Search version right after the paru string.

$ paru --version
paru v1.10.0 - libalpm v13.0.1
release_date(package_id)[source]

Publication timestamp of the latest release of an AUR package.

paru --sync --info prints the AUR RPC’s LastModified for an AUR package: the server-set timestamp of the last push, the same clock mpm’s yay overlay gates on. Git commit dates are client-set and forgeable, and are never consulted.

A package answering from an official repository instead (Repository is anything but aur) is out of the gate’s scope: Arch’s archive stages releases on its own, so it reads as COOLDOWN_EXEMPT and always passes.

$ paru --noconfirm --color never --sync --info paru
Repository      : aur
Name            : paru
Version         : 2.1.0-1
Description     : Feature packed AUR helper
URL             : https://github.com/morganamilo/paru
Licenses        : GPL-3.0-or-later
Maintainer      : Morganamilo
Votes           : 1289
Popularity      : 21.161366
First Submitted : Wed, 21 Oct 2020 20:07:31
Last Modified   : Sat, 12 Jul 2025 14:52:15
Out Of Date     : No
Return type:

datetime | None

upgrade_all_cli_excluding(package_ids)[source]

Full upgrade in one transaction, skipping the named packages.

pacman’s --ignore takes a comma-separated list, so the held packages ride the helper’s own --sysupgrade transaction: dependency ordering and the repo-plus-AUR interleaving stay paru’s job.

$ paru --noconfirm --color never --sync --refresh --sysupgrade \
    --ignore=fig,kiwi
Return type:

tuple[str, ...]

cli_names: tuple[str, ...] = ('paru',)

List of CLI names the package manager is known as.

This list of recognized CLI names is ordered by priority. That way we can influence the search of the right binary.

..hint::

This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

By default, this property’s value is derived from the manager’s ID (see the MetaPackageManager.__init__ method above).

id: str = 'paru'

Package manager’s ID.

Derived by defaults from the lower-cased class name in which underscores _ are replaced by dashes -.

This ID must be unique among all package manager definitions and lower-case, as they’re used as feature flags for the mpm CLI.

virtual: bool = False

Should we expose the package manager to the user?

Virtual package manager are just skeleton classes used to factorize code among managers of the same family.

class meta_package_manager.managers.pacman.Pikaur[source]

Bases: Pacman

AUR helper wrapping pacman, driven through the pikaur binary.

Inherits every operation, parser and forced argument from Pacman; the binary, the version probe and the release floor are what differ. Its own --query --upgrades reports AUR updates on top of the official repositories.

Like the other helpers, pikaur must run as the regular user: makepkg refuses to build as root, and pikaur drives sudo pacman itself for the privileged steps. mpm therefore never wraps it in sudo.

Note

pikaur wraps pacman’s options faithfully except –sync –refresh –sysupgrade``(`-Syu`), which it splits into a refresh pass and an upgrade pass so a user can amend the package selection in between. The inherited Pacman.upgrade_all_cli() still builds the combined form, and the --noconfirm forced by Pacman.pre_args is what keeps that split unattended.

Documentation: pikaur.

Initialize cli_errors list.

name: str = 'Arch Linux pikaur'

Return package manager’s common name.

Default value is based on class name.

homepage_url: str | None = 'https://github.com/actionless/pikaur'

Home page of the project, only used in documentation for reference.

Annotated so a subclass may drop the mark: DkpPacman is a pacman fork that Arch’s logo would misattribute.

default_sudo: bool = False

pikaur builds AUR packages through makepkg, which hard-refuses to run as root, and calls sudo pacman itself, so the escalation default inherited from Pacman must not wrap it.

internal_sudo: bool = True

pikaur calls sudo pacman from inside its own commands for the install, upgrade and removal steps.

requirement: str | None = '>=1.0.0'

pikaur versions independently of pacman, so the inherited >=5.0.0 would reject every release it has ever made.

The floor sits at the start of the 1.x series because nothing this class relies on is newer than it: the wrapped pacman option set and the Pikaur v version banner both predate it, and the parsers are pacman’s own.

version_regexes: tuple[str, ...] = ('.*Pikaur\\s+v(?P<version>\\S+)',)

Search version right after the Pikaur string.

Anchoring on Pikaur rather than the inherited Pacman pattern is load-bearing: pikaur reports both versions, embedding the second line of pacman --version in its own output, so the inherited regex would silently report the version of pacman instead.

$ pikaur --version
Pikaur v1.33.3
Pacman v6.0.2 - libalpm v13.0.2 - pyalpm v0.10.6

The real banner side-joins those lines with an ASCII-art mascot, which is why the block above is an illustration rather than a harvested fixture: the .* prefix is what absorbs the art. Both forms are emitted by the same print_version() of pikaur/print_department.py, the quiet one verbatim.

cli_names: tuple[str, ...] = ('pikaur',)

List of CLI names the package manager is known as.

This list of recognized CLI names is ordered by priority. That way we can influence the search of the right binary.

..hint::

This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

By default, this property’s value is derived from the manager’s ID (see the MetaPackageManager.__init__ method above).

id: str = 'pikaur'

Package manager’s ID.

Derived by defaults from the lower-cased class name in which underscores _ are replaced by dashes -.

This ID must be unique among all package manager definitions and lower-case, as they’re used as feature flags for the mpm CLI.

virtual: bool = False

Should we expose the package manager to the user?

Virtual package manager are just skeleton classes used to factorize code among managers of the same family.

class meta_package_manager.managers.pacman.Trizen[source]

Bases: Pacman

AUR helper wrapping pacman, driven through the trizen binary.

Inherits every operation, parser and forced argument from Pacman; the binary, the version probe and the release floor are what differ. Its own --query --upgrades reports AUR updates on top of the official repositories.

Like the other helpers, trizen must run as the regular user: makepkg refuses to build as root, and trizen calls sudo pacman itself for the privileged steps. mpm therefore never wraps it in sudo.

Note

Upstream is slow rather than stopped: commits continue, but 1.68 of December 2022 is still the newest release. It stays unflagged here because the stability policy keys unmaintained on an abandoned upstream, not on a quiet release cadence.

Documentation: trizen.

Initialize cli_errors list.

name: str = 'Arch Linux trizen'

Return package manager’s common name.

Default value is based on class name.

homepage_url: str | None = 'https://github.com/trizen/trizen'

Home page of the project, only used in documentation for reference.

Annotated so a subclass may drop the mark: DkpPacman is a pacman fork that Arch’s logo would misattribute.

cli_names: tuple[str, ...] = ('trizen',)

List of CLI names the package manager is known as.

This list of recognized CLI names is ordered by priority. That way we can influence the search of the right binary.

..hint::

This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

By default, this property’s value is derived from the manager’s ID (see the MetaPackageManager.__init__ method above).

id: str = 'trizen'

Package manager’s ID.

Derived by defaults from the lower-cased class name in which underscores _ are replaced by dashes -.

This ID must be unique among all package manager definitions and lower-case, as they’re used as feature flags for the mpm CLI.

virtual: bool = False

Should we expose the package manager to the user?

Virtual package manager are just skeleton classes used to factorize code among managers of the same family.

default_sudo: bool = False

trizen builds AUR packages through makepkg, which hard-refuses to run as root, and calls sudo pacman itself, so the escalation default inherited from Pacman must not wrap it.

internal_sudo: bool = True

trizen calls sudo pacman from inside its own commands for the install, upgrade and removal steps.

requirement: str | None = '>=1.0.0'

trizen versions independently of pacman, so the inherited >=5.0.0 would reject every release it has ever made. Nothing this class relies on is newer than the 1.x series: the parsers are pacman’s own.

version_regexes: tuple[str, ...] = ('trizen\\s+(?P<version>\\S+)',)

Search version right after the trizen string.

$ trizen --version
trizen 1.68
class meta_package_manager.managers.pacman.Yay[source]

Bases: Pacman

AUR helper wrapping pacman, driven through the yay binary.

Inherits every operation, parser and forced argument from Pacman; the binary, version probe and the release-age cooldown below are what differ. Its own --query --upgrades reports AUR updates on top of the official repositories.

Unlike pacman, the helper must run as the regular user: yay warns under root (Avoid running yay as root/sudo.) and any AUR build then dies in makepkg, which refuses to run as root. yay drives sudo itself for the privileged steps (its --sudo, --sudoflags and --sudoloop options), so mpm never wraps it in sudo. That also keeps the injected XDG_CONFIG_HOME cooldown overlay below visible to yay, where a sudo wrap would have reset the environment.

Note

yay exposes no release-age flag, so mpm enforces the supply-chain cooldown by overlaying a generated init.lua through a private XDG_CONFIG_HOME (see Yay.cooldown_env()). This needs yay >= 13.0.0, when the Lua UpgradeSelect/AURPreInstall hooks landed; an older yay stays a usable manager but cannot honor a cooldown. The upstream request for a less invasive injection point is Jguer/yay#2883.

Initialize cli_errors list.

cli_names: tuple[str, ...] = ('yay',)

List of CLI names the package manager is known as.

This list of recognized CLI names is ordered by priority. That way we can influence the search of the right binary.

..hint::

This was helpful in the case of the Python transition from 2.x to 3.x, where multiple versions of the same executable were named python or python3.

By default, this property’s value is derived from the manager’s ID (see the MetaPackageManager.__init__ method above).

id: str = 'yay'

Package manager’s ID.

Derived by defaults from the lower-cased class name in which underscores _ are replaced by dashes -.

This ID must be unique among all package manager definitions and lower-case, as they’re used as feature flags for the mpm CLI.

virtual: bool = False

Should we expose the package manager to the user?

Virtual package manager are just skeleton classes used to factorize code among managers of the same family.

name: str = 'Arch Linux yay'

Return package manager’s common name.

Default value is based on class name.

homepage_url: str | None = 'https://github.com/Jguer/yay'

Home page of the project, only used in documentation for reference.

Annotated so a subclass may drop the mark: DkpPacman is a pacman fork that Arch’s logo would misattribute.

default_sudo: bool = False

yay discourages root runs (makepkg hard-refuses them for AUR builds) and drives sudo itself, so the escalation default inherited from Pacman must not wrap it. A wrap would also strip the XDG_CONFIG_HOME cooldown overlay through sudo’s environment reset.

internal_sudo: bool = True

yay calls the escalation binary from inside its own commands, configurable through its --sudo, --sudoflags and --sudoloop options.

requirement: str | None = '>=11.0.0'

Version requirement specifier.

Supports a comma-separated range of constraints (e.g. ">=1.20.0,<2.0.0"). A bare version string like "1.20.0" is treated as >=1.20.0.

Parsed by meta_package_manager.version.VersionRange.

Defaults to None, which deactivates version check entirely.

cooldown_env_var: ClassVar[str | None] = 'XDG_CONFIG_HOME'

yay reads no release-age option of its own, so mpm repurposes XDG_CONFIG_HOME to point yay at the throwaway config overlay built by cooldown_env().

Unlike the single-value variables of pip/uv/npm, the value is a directory; the cutoff itself rides alongside it in MPM_COOLDOWN_EPOCH. Set so the structural supports_cooldown check (and the --cooldown help text) still recognize yay as cooldown-capable.

version_regexes: tuple[str, ...] = ('yay\\s+v(?P<version>\\S+)',)

Search version right after the yay string.

$ yay --version
yay v11.1.2 - libalpm v13.0.1
cooldown_requirement = '>=13.0.0'

Minimum yay version whose Lua hooks the cooldown overlay relies on.

v13.0.0 introduced yay.create_autocmd and the UpgradeSelect/AURPreInstall events. Kept apart from requirement (>=11.0.0) so a v11/v12 yay stays fully usable for everything except the cooldown.

property supports_cooldown: bool

Whether this yay can natively enforce a release-age cooldown.

Reports the structural capability while idle (cooldown is None) so the import-time COOLDOWN_SUPPORTED_MANAGERS help text stays I/O-free, and only probes the manager version once a cooldown is active, gating on cooldown_requirement. A yay older than that (or undetectable) reports no support, so the fail-closed default skips install/upgrade rather than running them unguarded.

cooldown_env()[source]

Deliver the release-age cooldown through a private XDG_CONFIG_HOME.

yay has no release-age option, so rather than injecting a single value mpm points yay at _cooldown_overlay_dir: a throwaway config tree whose generated init.lua (_YAY_COOLDOWN_INIT_LUA) registers the cooldown Lua hooks. The cutoff travels as MPM_COOLDOWN_EPOCH (Unix seconds of now - cooldown), keeping the init.lua asset static, and MPM_YAY_USER_DIR lets it chain the user’s real config so the redirect stays lossless.

Returns an empty mapping when no cooldown is set or the installed yay predates the Lua hooks (see supports_cooldown).

Return type:

Mapping[str, str | None]