aptitude¶
- ID
aptitude- Home page
- Version requirement
>= 0.4.11.4
- Platforms
🅱️ BSD · 🐧 Linux · ⨂ Unix
- Operations
installed·outdated·orphans·search·install·upgrade·upgrade_all·remove·sync·cleanup- purl types
pkg:aptitude·pkg:deb- CLI name
aptitude- Every call
aptitude --quiet --disable-columns <command>- Issues and PRs
- Source
Front-end to Debian’s apt, with a resolver and a query language of its own.
Aptitude reaches the same archives apt does, over the same dpkg backend,
and is wrapped on the same grounds as Nala:
a distinct tool with a vocabulary of its own, rather than a translation
layer over another CLI. It shares dpkg’s lock with the rest of that family,
so mpm runs it serially against them.
Note
Every listing is a search over aptitude’s own pattern language (~i for
installed, ~U for upgradable, ~i~g for installed garbage) rendered
through an explicit --display-format. That projection is what makes the
output a flat package,version table instead of the padded columns the
interactive interface draws.
Caution
A query reaches aptitude as a regular expression, not as a literal
substring, so it is escaped by escape_pattern() before being spliced
into a ~n or ~d term. Skipping that step is not a near-miss but a silent
empty result: ~n^libsigc++-2.0-0v5$ compiles to a regex matching no
package at all.
Note
--disable-columns is redundant on a pipe, aptitude having disabled
columns on a redirection since 0.7.5, and is passed anyway: that heuristic
is a moving target (a later release narrowed it again for a caller setting a
width explicitly), and the flag is what the manual’s own example uses to ask
for unformatted output.
Documentation: aptitude(8) man page.
What mpm adds to aptitude¶
mpm reaches across every manager at once, not aptitude alone: mpm installed and mpm outdated cover aptitude alongside apt, apt-mint 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 aptitude commands, in mpm¶
You already know aptitude: 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 |
|
|
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 |
|---|---|---|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
Selecting and configuring aptitude¶
Deselect aptitude for a single run with --no-aptitude, or persist the choice in your configuration:
[mpm]
aptitude = false
The arguments and environment variables listed in the box atop this page are forced on every aptitude 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.aptitude]
timeout = 900
mpm config-template aptitude prints every overridable attribute as a ready-to-paste block.
Recipes¶
A few jobs you would otherwise script around aptitude, one mpm command each:
Snapshot and clone a machine:
mpm --aptitude dump aptitude.toml, thenmpm restore aptitude.tomlon the next one.Export a compliance SBOM:
mpm --aptitude sbom(CycloneDX by default,--spdxfor SPDX).
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.
Concurrency¶
mpm never runs aptitude at the same time as apt, apt-mint, deb-get, nala or pacstall: they all install through dpkg and serialize on its /var/lib/dpkg/lock. 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 aptitude’s release-age gating, from the cooldown support table:
Status: ➖ N/A (same Debian archives as apt)
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); --cooldown best-effort opts back in.
Version probe¶
The version is probed by running:
$ aptitude --version
aptitude 0.8.13
Compiler: g++ 14.2.0
Compiled against:
apt version 7.0.0
NCurses version 6.5
libsigc++ version: 2.12.1
Gtk+ support disabled.
Qt support disabled.
Current library versions:
NCurses version: ncurses 6.5.20250216
cwidget version: 0.5.18
Apt version: 7.0.0
and extracted with:
r"aptitude\s+(?P<version>\S+)"
Reference traces¶
Raw native outputs captured in the manager source: the reference mpm’s parsers were written against. If you know aptitude well and a transcript below looks wrong, or a newer release changed its output format, report it.
$ aptitude --quiet --disable-columns search ~i --display-format %p,%v
adduser,3.152
apparmor,4.1.0-1
apt,3.0.3
apt-utils,3.0.3
aptitude,0.8.13-7
aptitude-common,0.8.13-7
base-files,13.8+deb13u6
base-passwd,3.6.7
bash,5.2.37-2+b9
bash-completion,1:2.16.0-7
bsdutils,1:2.41-5
busybox,1:1.37.0-6+b8
bzip2,1.0.8-6
ca-certificates,20250419
$ aptitude --quiet --disable-columns search ~U --display-format %p,%v,%V
bsdutils,1:2.41-5,1:2.41.5-0+deb13u1
eject,2.41-5,2.41.5-0+deb13u1
fdisk,2.41-5,2.41.5-0+deb13u1
libblkid1,2.41-5,2.41.5-0+deb13u1
libexpat1,2.7.1-2,2.8.3-1~deb13u1
libfdisk1,2.41-5,2.41.5-0+deb13u1
liblastlog2-2,2.41-5,2.41.5-0+deb13u1
libmount1,2.41-5,2.41.5-0+deb13u1
libpython3.13-minimal,3.13.5-2+deb13u3,3.13.5-2+deb13u4
libpython3.13-stdlib,3.13.5-2+deb13u3,3.13.5-2+deb13u4
$ aptitude --quiet --disable-columns search ~i~g --display-format %p,%v
nyancat,1.5.2-0.3+b1
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 --aptitude installed --output json, or csv, toml, yaml), each package carrying a purl and a version comparable across managers.
Changelog¶
8.0.0.dev0(unreleased)Add aptitude package manager, with inventory, outdated, search, orphans, install, remove, upgrade, sync and cache cleanup.