Debian apt¶
Base class for Debian’s apt front-end and its variants.
Documentation:
See other command equivalences at: https://wiki.archlinux.org/title/Pacman/Rosetta
mpm drives the high-level apt binary, not apt-get or apt-cache,
over system-wide packages. Mutations escalate through sudo and force
--yes to stay non-interactive. APT_Mint retargets Linux
Mint’s same-named but differently-behaved apt.
Note
apt’s listing and search commands emit Listing..., Sorting...
and Full Text Search... preambles plus progress indicators.
--quiet drops the progress bars, and each parser anchors on the
name/suite version arch row shape, so the preamble lines fall
through.
Note
search matches names only by default. An exact query is wrapped as
the ^query$ regex apt supports natively; an extended query switches
to --full to pull descriptions into the output for mpm to
post-filter.
Home page: https://wiki.debian.org/AptCLI
Version requirement:
>=1.0.0
Platforms¶
🅱️ BSD
🐧 Linux
⨂ Unix
Operations¶
Operation |
Supported |
|---|---|
|
✓ |
|
✓ |
|
✓ |
|
✓ |
|
✓ |
|
✓ |
|
✓ |
|
✓ |
|
✓ |
Ecosystem¶
Accepted purl types:
pkg:apt,pkg:deb
Usage¶
$ mpm --apt installed
$ mpm --apt search "query"
$ mpm --apt upgrade --all
$ mpm install pkg:apt/hello
$ mpm --dry-run --apt 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-apt, disable it from your configuration, or tune its invocation attributes with per-manager overrides.
Command line¶
CLI names, in lookup order:
aptArguments forced before each call:
--quiet
The version is probed by running:
$ apt --version
apt 2.0.6 (amd64)
and extracted with:
r"apt\s+(?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 Debian apt’s release-age gating, from the cooldown support table:
Status: ➖ N/A (Debian’s
unstable→testing→stablemigration is functionally similar)Reference: Nesbitt, Package managers need to cool down
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 Debian apt well and a transcript below looks wrong, or a newer release changed its output format, report it.
$ apt --quiet list --installed
Listing...
adduser/xenial,now 3.113+nmu3ubuntu4 all [installed]
bc/xenial,now 1.06.95-9build1 amd64 [installed]
bsdmainutils/xenial,now 9.0.6ubuntu3 amd64 [installed,automatic]
ca-certificates/xenial,now 20160104ubuntu1 all [installed]
cron/xenial,now 3.0pl1-128ubuntu2 amd64 [installed]
debconf/xenial,now 1.5.58ubuntu1 all [installed]
debianutils/xenial,now 4.7 amd64 [installed]
diffutils/xenial,now 1:3.3-3 amd64 [installed]
e2fsprogs/xenial,now 1.42.13-1ubuntu1 amd64 [installed]
ethstatus/xenial,now 0.4.3ubuntu2 amd64 [installed]
file/xenial,now 1:5.25-2ubuntu1 amd64 [installed]
findutils/xenial,now 4.6.0+git+20160126-2 amd64 [installed]
libidn2-0/jammy,now 2.3.2-2build1 amd64 [installed,automatic]
libidn2-0/jammy,now 2.3.2-2build1 i386 [installed,automatic]
$ apt --quiet list --upgradable
Listing...
apt/xenial-updates 1.2.19 amd64 [upgradable from: 1.2.15ubuntu0.2]
nano/xenial-updates 2.5.3-2ubuntu2 amd64 [upgradable from: 2.5.3-2]