APTITUDE(8)
okay so this is aptitude(8) β the Command-line reference, and bestie, you're about to get the whole high-level interface to the package manager explained with maximal sparkle. πβ¨ No cap, we're keeping every flag and every fact; the vibe is just upgraded. π¦
πΈ NAME πΈ
aptitude β high-level interface to the package manager π
π¦ SYNOPSIS π¦
Here are the shapes this command can take, fr fr:
aptitude [<options>...] {autoclean | clean | forget-new | keep-all |
update}
aptitude [<options>...] {full-upgrade | safe-upgrade} [<packages>...]
aptitude [<options>...] {build-dep | build-depends | changelog |
download | forbid-version | hold | install | markauto | purge |
reinstall | remove | show | showsrc | source | unhold |
unmarkauto | versions} <packages>...
aptitude extract-cache-subset <output-directory> <packages>...
aptitude [<options>...] search <patterns>...
aptitude [<options>...] {add-user-tag | remove-user-tag} <tag>
<packages>...
aptitude [<options>...] {why | why-not} [<patterns>...] <package>
aptitude [-S <fname>] [--autoclean-on-startup | --clean-on-startup | -i
| -u]
aptitude help
π DESCRIPTION π
aptitude is a text-based interface to the Debian GNU/Linux package system. π
It lets you view the list of packages and perform package management tasks such as installing, upgrading, and removing packages. You can do all of this from a visual interface or from the command-line. Iconic. π
π COMMAND-LINE ACTIONS π
The first argument which does not begin with a hyphen (-) is considered to be an action that the program should perform. If an action is not specified on the command-line, aptitude will start up in visual mode. π
The following actions are available:
install
Install one or more packages. The packages should be listed after the install command; if a package name contains a tilde character (~) or a question mark (?), it will be treated as a search pattern and every package matching the pattern will be installed (see the section βSearch Patternsβ in the aptitude reference manual). π―
To select a particular version of the package, append =<version> to the package name: for instance, aptitude install apt=0.3.1. Similarly, to select a package from a particular archive, append /<archive> to the package name: for instance, aptitude install apt/experimental. You cannot specify both an archive and a version for a package. π«
Not every package listed on the command line has to be installed; you can tell aptitude to do something different with a package by appending an βoverride specifierβ to the name of the package. For example, aptitude remove wesnoth+ will install wesnoth, not remove it. The following override specifiers are available:
<package>+
Install <package>. If the package was not installed, it is marked as manually installed, and the dependencies newly installed are marked with the automatic flag. If the package or the dependencies were already installed, the automatic flag is preserved. See the section about automatic installations in the documentation for more information. β¨
<package>+M
Install <package> and immediately mark it as automatically installed (note that if nothing depends on <package>, this will cause it to be immediately removed). π
<package>-
Remove <package>. ποΈ
<package>_
Purge <package>: remove it and all its associated configuration and data files. π§Ή
<package>=
Place <package> on hold: cancel any active installation, upgrade, or removal, and prevent this package from being automatically upgraded in the future. β
<package>:
Keep <package> at its current version: cancel any installation, removal, or upgrade. Unlike βholdβ (above) this does not prevent automatic upgrades in the future. π°οΈ
<package>&M
Mark <package> as having been automatically installed. π€
<package>&m
Mark <package> as having been manually installed. π
<package>&BD
Install the build-dependencies of a <package>. π οΈ
As a special case, install with no arguments will act on any stored/pending actions. π
Note: Once you enterYat the final confirmation prompt, theinstallcommand will modifyaptitude's stored information about what actions to perform. Therefore, if you issue (e.g.) the commandaptitude install foo baron packages previously uninstalled, and then the installation fails onceaptitudehas started downloading and installing packages, you will need to runaptitude remove foo barto go back to the previous state (and possibly undo installations or upgrades to other packages that were affected by theinstallaction). π
remove, purge, reinstall
These commands are the same as install, but apply the named action to all packages given on the command line for which it is not overridden. π
For instance, aptitude remove '~ndeity' will remove all packages whose name contains deity. π₯
build-depends, build-dep
Satisfy the build-dependencies of a package. Each package name may be a source package, in which case the build dependencies of that source package are installed; otherwise, binary packages are found in the same way as for the install command, and the build-dependencies of the source packages that build those binary packages are satisfied. π§±
If the command-line parameter --arch-only is present, only architecture-dependent build dependencies (i.e., not Build-Depends-Indep or Build-Conflicts-Indep) will be obeyed. ποΈ
markauto, unmarkauto
Mark packages as automatically installed or manually installed, respectively. Packages are specified in exactly the same way as for the install command. For instance, aptitude markauto '~slibs' will mark all packages in the libs section as having been automatically installed. π€
For more information on automatically installed packages, see the section βManaging Automatically Installed Packagesβ in the aptitude reference manual. π
hold, unhold, keep
Mark packages to be on hold, remove this property, or set to keep in the current state. Packages are specified in exactly the same way as for the install command. For instance, aptitude hold '~e^dpkg$' will mark all packages coming from the source package dpkg to be on hold. β
The difference between hold and keep is that hold will cause a package to be ignored by future safe-upgrade or full-upgrade commands, while keep merely cancels any scheduled actions on the package. unhold will allow a package to be upgraded by future safe-upgrade or full-upgrade commands, without otherwise altering its state. π
keep-all
Cancels all scheduled actions on all packages; any packages whose sticky state indicates an installation, removal, or upgrade will have this sticky state cleared. π§½
forget-new
Forgets all internal information about what packages are βnewβ (equivalent to pressing f when in visual mode). π±
This command accepts package names or patterns as arguments. If the string contains a tilde character (~) or a question mark (?), it will be treated as a search pattern and every package matching the pattern will be considered (see the section βSearch Patternsβ in the aptitude reference manual). π
forbid-version
Forbid a package from being upgraded to a particular version, while allowing automatic upgrades to future versions. This is useful for example to avoid a known broken version of a package, without having to set and clear manual holds. π«
By default, aptitude will select the forbidden version to be the one which the package would normally be upgraded (the candidate version). This may be overridden by appending =<version> to the package name: for instance, aptitude forbid-version vim=1.2.3.broken-4. π
To revert the action, aptitude install <package> will remove the ban. To remove the forbidden version without installing the candidate version, the current version should be appended: install <package>=<version>. β©οΈ
update
Updates the list of available packages from the apt sources (this is equivalent to apt-get update). π
safe-upgrade
Upgrades installed packages to their most recent version. Installed packages will not be removed unless they are unused (see the section βManaging Automatically Installed Packagesβ in the aptitude reference manual). Packages which are not currently installed may be installed to resolve dependencies unless the --no-new-installs command-line option is supplied. β¨
If no <package>s are listed on the command line, aptitude will attempt to upgrade every package that can be upgraded. Otherwise, aptitude will attempt to upgrade only the packages which it is instructed to upgrade. The <package>s can be extended with suffixes in the same manner as arguments to aptitude install, so you can also give additional instructions to aptitude here; for instance, aptitude safe-upgrade bash dash- will attempt to upgrade the bash package and remove the dash package. π
It is sometimes necessary to remove one package in order to upgrade another; this command is not able to upgrade packages in such situations. Use the full-upgrade command to upgrade as many packages as possible. π€
full-upgrade
Upgrades installed packages to their most recent version, removing or installing packages as necessary. It also installs new Essential or Required packages. This command is less conservative than safe-upgrade and thus more likely to perform unwanted actions. However, it is capable of upgrading packages that safe-upgrade cannot upgrade. π₯
If no <package>s are listed on the command line, aptitude will attempt to upgrade every package that can be upgraded. Otherwise, aptitude will attempt to upgrade only the packages which it is instructed to upgrade. The <package>s can be extended with suffixes in the same manner as arguments to aptitude install, so you can also give additional instructions to aptitude here; for instance, aptitude full-upgrade bash dash- will attempt to upgrade the bash package and remove the dash package. π₯
π Note, bestie: this command was originally nameddist-upgradefor historical reasons, and aptitude still recognizesdist-upgradeas a synonym forfull-upgrade. so type whichever one your fingers feel like, it's the same thing, fr fr. π
π search
okay so search goes looking for packages that match one of the patterns you hand it on the command line. and here's the tea: every package that matches any of the patterns you gave gets shown. so for example, aptitude search '~N' edit will list all the "new" packages and all the packages whose name contains edit. wondering what the heck a search pattern even is? go read the section "Search Patterns" in the aptitude reference manual. π
Note: in that example up there,aptitude search '~N' edithas two arguments aftersearch, so it's searching for two patterns:~Nandedit. as described in the search pattern reference, a single pattern made of two sub-patterns separated by a space (like~N edit) matches only if both patterns match. so the commandaptitude search '~N edit'will only show "new" packages whose name containsedit. see the difference? one is an OR situation, the other is an AND situation. iykyk. π§ β¨
unless you pass the -F option, the output of aptitude search looks something like this:
i apt - Advanced front-end for dpkg
pi apt-build - frontend to apt to build, optimize and in
cp apt-file - APT package searching utility -- command-
ihA raptor-utils - Raptor RDF Parser utilities
each search result gets its own line, one per line, no sharing. π
now let's decode that cryptic little prefix, because it's giving β¨mysteryβ¨ but it's actually super useful:
- the first character = the current state of the package:
pβ no trace of the package exists on the systemcβ the package was deleted but its configuration files remain on the systemiβ the package is installedvβ the package is virtual
those are just the most common ones, bestie.
- the second character = the stored action (if there is one β otherwise you just get a blank space, it's not being shady, there's genuinely nothing planned) to be performed on the package:
iβ the package will be installeddβ the package will be deletedpβ the package and its configuration files will be removed
- the third character: if it's
A, the package was automatically installed. π€
want the complete list of possible state and action flags? the section "Accessing Package Information" in the aptitude reference guide has you covered. and if you wanna customize how search spits stuff out, go peek at the command-line options -F and --sort. π
π show
show displays detailed information about one or more packages. simple as that.
β οΈ but watch out: if a package name contains a tilde character (~) or a question mark (?), it gets treated as a search pattern instead, and every matching package gets displayed. (see "Search Patterns" in the aptitude reference manual for the whole lore.)
here's the verbosity tea β: if the verbosity level is 1 or greater (meaning at least one -v is chilling on the command line), you get info about all versions of the package. otherwise you get info about the "candidate version" β which is the version that aptitude install would download. π
wanna see a different version? just append =<version> to the package name. wanna see the version from a particular archive or release? append /<archive> or /<release> instead: for instance, /unstable or /sid. and if either of those is present, then only the version you asked for gets displayed β regardless of the verbosity level. it's giving "i asked for one thing, i got one thing". π
more verbosity details:
- if the verbosity level is 1 or greater β the package's architecture, compressed size, filename, and
md5sumfields get displayed. π§Ύ - if the verbosity level is 2 or greater β the select version or versions get displayed once for each archive in which they are found.
π¦ showsrc
showsrc displays detailed information about one or more source packages.
heads up: this is a thin wrapper over apt(8). that's it, that's the whole command. π«Ά
β¬οΈ source
source downloads one or more source packages.
also a thin wrapper over apt(8). iconic behaviour honestly. β¨
πΈ versions
versions displays the versions of the packages you list on the command line. like so:
$ aptitude versions wesnoth
p 1:1.4.5-1 100
p 1:1.6.5-1 unstable 500
p 1:1.7.14-1 experimental 1
each version gets its own line. the leftmost three characters indicate:
- the current state
- the planned state (if any)
- whether the package was automatically installed
for the meanings of all that, go read the documentation of aptitude search (you already met it above π). to the right of the version number you'll find the releases from which the version is available, and the pin priority of the version.
now if a package name contains a tilde character (~) or a question mark (?), it gets treated as a search pattern and all matching versions get displayed (see "Search Patterns" in the aptitude reference manual). which means, for instance, aptitude versions '~i' will display all the versions currently installed on the system and nothing else β not even other versions of the same packages. it said what it said. π
$ aptitude versions '~nexim4-daemon-light'
Package exim4-daemon-light:
i 4.71-3 100
p 4.71-4 unstable 500
Package exim4-daemon-light-dbg:
p 4.71-4 unstable 500
if the input is a search pattern, or if more than one package's versions are going to be displayed, aptitude will automatically group the output by package, like you just saw above. you can turn that off with --group-by=none, and in that case aptitude displays one single list of all the versions it found, and automatically includes the package name in each output line:
$ aptitude versions --group-by=none '~nexim4-daemon-light'
i exim4-daemon-light 4.71-3 100
p exim4-daemon-light 4.71-4 unstable 500
p exim4-daemon-light-dbg 4.71-4 unstable 500
and to get rid of the package name too? pass --show-package-names=never:
$ aptitude versions --show-package-names=never --group-by=none '~nexim4-daemon-light'
i 4.71-3 100
p 4.71-4 unstable 500
p 4.71-4 unstable 500
beyond all those options, the info printed for each version can be controlled by the command-line option -F. the order in which versions are displayed can be controlled by the command-line option --sort. and if you do not want aptitude formatting the output into columns, use --disable-columns. ποΈ
π·οΈ add-user-tag, remove-user-tag
these two add a user tag to, or remove a user tag from, the selected group of packages. if a package name contains a tilde (~) or question mark (?), it's treated as a search pattern, and the tag gets added to or removed from all the packages that match the pattern (see "Search Patterns" in the aptitude reference manual). π«Ά
so what is a user tag? literally just an arbitrary string associated with a package. you can use them with the ?user-tag(<tag>) search term, which will select all the packages that have a user tag matching <tag>. custom labels, bestie, your own little organisational system. π
π€ why, why-not
these two explain the reason that a particular package should (or cannot) be installed on the system.
the command searches for packages that require or conflict with the given package. it then displays a sequence of dependencies leading to the target package, along with a note indicating the installed state of each package in the dependency chain:
$ aptitude why kdepim
i nautilus-data Recommends nautilus
i A nautilus Recommends desktop-base (>= 0.2)
i A desktop-base Suggests gnome | kde | xfce4 | wmaker
p kde Depends kdepim (>= 4:3.4.3)
so why finds a dependency chain that would install the package named on the command line, like above. but real talk: note that the dependency aptitude produced in this case is only a suggestion. why? because no package currently installed on this computer depends on or recommends the kdepim package β and if a stronger dependency were available, aptitude would have displayed that one instead. it shows you the best it's got. π
why-not, in contrast, finds a dependency chain leading to a conflict with the target package:
$ aptitude why-not textopo
i ocaml-core Depends ocamlweb
i A ocamlweb Depends tetex-extra | texlive-latex-extra
i A texlive-latex-extra Conflicts textopo
and now the fancy part β¨: if one or more <pattern>s are present (in addition to the mandatory last argument, which should be a valid <package> name), then aptitude will begin its search at those patterns. i.e. the first package in the chain it prints to explain why <package> is or is not installed will be a package matching the pattern in question. those patterns are considered to be package names unless they contain a tilde character (~) or a question mark (?), in which case they're treated as search patterns (see "Search Patterns" in the aptitude reference manual).
and if no patterns are present? aptitude searches for dependency chains beginning at manually installed packages. which effectively shows you the packages that have caused, or would cause, a given package to be installed. detective work, but make it cute. ππ
Note π βaptitude whydoes not do full dependency resolution, bestie. It only shows the direct relationships between packages. So like, if A requires B, C requires D, and B and C conflict, thenaptitude why-not Dwill not give you the answer βA depends on B, B conflicts with C, and D depends on Cβ. It's just not that deep. π
By default, aptitude outputs only the βmost installed, strongest, tightest, shortestβ dependency chain. The way that works: it looks for a chain that only contains packages which are installed or will be installed π; under that restriction it looks for the strongest possible dependencies πͺ; it looks for chains that avoid ORed dependencies and Provides; and it looks for the shortest dependency chain meeting those criteria. These rules are then progressively weakened until a match is found. Iconic adaptive behaviour, ngl. β¨
If the verbosity level is 1 or more, then all the explanations aptitude can find will be displayed, in inverse order of relevance. π If the verbosity level is 2 or more, a truly excessive amount of debugging information will be printed to standard output. Like, buckle up. π
This command returns 0 if successful, 1 if no explanation could be constructed, and -1 if an error occurred.
clean</p>
Removes all previously downloaded .deb files from the package cache directory (usually /var/cache/apt/archives). π§Ήβ¨
autoclean</p>
Removes any cached packages which can no longer be downloaded. This lets you stop a cache from growing out of control over time without completely emptying it. It's the β¨selective declutterβ¨ of package management, fr fr.
changelog</p>
Downloads and displays the Debian changelog for each of the given source or binary packages. π
By default, the changelog for the version which would be installed with aptitude install is downloaded. You can select a particular version of a package by appending =<version> to the package name; you can select the version from a particular archive or release by appending /<archive> or /<release> to the package name (for instance, /unstable or /sid). Main character energy: specify exactly which one you want. π
download</p>
Downloads the .deb file for the given package to the current directory. π₯
This is a thin wrapper over apt(8).
extract-cache-subset</p>
Copy the apt configuration directory (/etc/apt) and a subset of the package database to the specified directory. If no packages are listed, the entire package database is copied; otherwise only the entries corresponding to the named packages are copied. Each package name may be a search pattern, and all the packages matching that pattern will be selected (see the section βSearch Patternsβ in the aptitude reference manual). Any existing package database files in the output directory will be overwritten. β οΈ
Dependencies in binary package stanzas will be rewritten to remove references to packages not in the selected set.
help</p>
Displays a brief summary of the available commands and options. π
β¨ OPTIONS β¨
The following options may be used to modify the behavior of the actions described above. π Note that while all options will be accepted for all commands, some options don't apply to particular commands and will just be ignored by those commands. No hard feelings, they simply vibe elsewhere. π¦
--add-user-tag<tag> β Forfull-upgrade,safe-upgrade,forbid-version,hold,install,keep-all,markauto,unmarkauto,purge,reinstall,remove,unhold, andunmarkauto: add the user tag <tag> to all packages that are installed, removed, or upgraded by this command, as if with theadd-user-tagcommand. π·οΈ--add-user-tag-to<tag>,<pattern> β Forfull-upgrade,safe-upgrade,forbid-version,hold,install,keep-all,markauto,unmarkauto,purge,reinstall,remove,unhold, andunmarkauto: add the user tag <tag> to all packages that match <pattern>, as if with theadd-user-tagcommand. The pattern is a search pattern as described in the section βSearch Patternsβ in the aptitude reference manual. π
So for instance, aptitude safe-upgrade --add-user-tag-to "new-installs,?action(install)" will add the tag new-installs to all the packages installed by the safe-upgrade command. Slay. π
--allow-new-upgradesβ When the safe resolver is being used (i.e.,--safe-resolverwas passed, the action issafe-upgrade, orAptitude::Always-Use-Safe-Resolveris set totrue), allow the dependency resolver to install upgrades for packages regardless of the value ofAptitude::Safe-Resolver::No-New-Upgrades. β¬οΈ--allow-new-installsβ Allow thesafe-upgradecommand to install new packages; when the safe resolver is being used (i.e.,--safe-resolverwas passed, the action issafe-upgrade, orAptitude::Always-Use-Safe-Resolveris set totrue), allow the dependency resolver to install new packages. This option takes effect regardless of the value ofAptitude::Safe-Resolver::No-New-Installs. π--allow-untrustedβ Install packages from untrusted sources without prompting. You should only use this if you know what you are doing, as it could easily compromise your system's security. π¨
Bestie. NO. Do not casually pass this flag unless you genuinely know what you're doing β it can compromise your system's security, and that is not the vibe we're going for. π
--disable-columnsβ This option causesaptitude searchandaptitude versionsto output their results without any special formatting. In particular: normally aptitude will add whitespace or truncate search results in an attempt to fit its results into vertical βcolumnsβ. With this flag, each line will be formed by replacing any format escapes in the format string with the corresponding text; column widths will be ignored. π«π
For instance, the first few lines of output from aptitude search -F '%p %V' --disable-columns libedataserver might be:
disksearch 1.2.1-3
hp-search-mac 0.1.3
libbsearch-ruby 1.5-5
libbsearch-ruby1.8 1.5-5
libclass-dbi-abstractsearch-perl 0.07-2
libdbix-fulltextsearch-perl 0.73-10
As in the above example, --disable-columns is often useful in combination with a custom display format set using the command-line option -F.
This corresponds to the configuration option Aptitude::CmdLine::Disable-Columns.
-D,--show-depsβ For commands that will install or remove packages (install,full-upgrade, etc.), show brief explanations of automatic installations and removals. π§Ύ
This corresponds to the configuration option Aptitude::CmdLine::Show-Deps.
-d,--download-onlyβ Download packages to the package cache as necessary, but do not install or remove anything. By default, the package cache is stored in/var/cache/apt/archives. π¦
This corresponds to the configuration option Aptitude::CmdLine::Download-Only.
-F<format>,--display-format<format> β Specify the format which should be used to display output from thesearchandversionscommands. For instance, passing%p %v %Vfor <format> will display a package's name, followed by its currently installed version and its candidate version (see the section βCustomizing how packages are displayedβ in the aptitude reference manual for more information). β¨
The command-line option --disable-columns is often useful in combination with -F.
For search, this corresponds to the configuration option Aptitude::CmdLine::Package-Display-Format; for versions, this corresponds to the configuration option Aptitude::CmdLine::Version-Display-Format.
-fβ Try hard to fix the dependencies of broken packages, even if it means ignoring the actions requested on the command line. π€
This corresponds to the configuration item Aptitude::CmdLine::Fix-Broken.
--full-resolverβ When package dependency problems are encountered, use the default βfullβ resolver to solve them. Unlike the βsafeβ resolver activated by--safe-resolver, the full resolver will happily remove packages to fulfill dependencies. It can resolve more situations than the safe algorithm, but its solutions are more likely to be undesirable. π
This option can be used to force the use of the full resolver even when Aptitude::Always-Use-Safe-Resolver is true.
--group-by<grouping-mode> β Control how theversionscommand groups its output. The following values are recognized:archiveβ group packages by the archive they occur in (βstableβ, βunstableβ, etc.). If a package occurs in several archives, it will be displayed in each of them. πautoβ group versions by their package unless there is exactly one argument and it is not a search pattern.noneβ display all the versions in a single list without any grouping. πpackageβ group versions by their package.source-packageβ group versions by their source package.source-versionβ group versions by their source package and source version.
This corresponds to the configuration option Aptitude::CmdLine::Versions-Group-By.
-h,--helpβ Display a brief help message. Identical to thehelpaction. π«Ά--log-file=<file> β If <file> is a nonempty string, log messages will be written to it, except that if <file> is-, the messages will be written to standard output instead. If this option appears multiple times, the last occurrence is the one that will take effect. π
This does not affect the log of installations that aptitude has performed (/var/log/aptitude); the log messages written using this configuration include internal program events, errors, and debugging messages. See the command-line option --log-level to get more control over what gets logged.
This corresponds to the configuration option Aptitude::Logging::File.
--log-level=<level>,--log-level=<category>:<level> β--log-level=<level> causes aptitude to only log messages whose level is <level> or higher. For instance, setting the log level toerrorwill cause only messages at the log levelserrorandfatalto be displayed; all others will be hidden. Valid log levels (in descending order) areoff,fatal,error,warn,info,debug, andtrace. The default log level iswarn. πͺ΅
--log-level=<category>:<level> causes messages in <category> to only be logged if their level is <level> or higher.
--log-levelβ (already met this one up top π but here's the rest of the tea) it can show up on the command line multiple times, and the most specific setting is the one that wins. So if you pass--log-level=aptitude.resolver:fataland--log-level=aptitude.resolver.hints.match:trace, then messages inaptitude.resolver.hints.parseonly get printed if their level isfatal, but literally every message inaptitude.resolver.hints.matchgets printed. And if you set the level of the same category two or more times? The last setting is the one that takes effect. Periodt. π
This has zero effect on the log of installations that aptitude has performed (/var/log/aptitude) β the log messages written using this configuration include internal program events, errors, and debugging messages. Peep the command-line option --log-file if you wanna change where log messages go. π
This corresponds to the configuration group Aptitude::Logging::Levels.
--log-resolverβ sets some standard log levels related to the resolver, so you get logging output that's suitable for processing with automated tools. It's equivalent to the command-line options
--log-level=aptitude.resolver.search:trace
--log-level=aptitude.resolver.search.tiers:info
π οΈβ¨
--no-new-installsβ stopssafe-upgradefrom installing any new packages. When the safe resolver is being used (i.e.--safe-resolverwas passed orAptitude::Always-Use-Safe-Resolveris set totrue), it forbids the dependency resolver from installing new packages. This option takes effect regardless of the value ofAptitude::Safe-Resolver::No-New-Installs. π ββοΈ
This mimics the historical behavior of apt-get upgrade. π°οΈ
--no-new-upgradesβ when the safe resolver is being used (i.e.--safe-resolverwas passed orAptitude::Always-Use-Safe-Resolveris set totrue), it forbids the dependency resolver from installing upgrades for packages, regardless of the value ofAptitude::Safe-Resolver::No-New-Upgrades. π--no-show-resolver-actionsβ do not display the actions performed by the βsafeβ resolver, overriding any configuration option or any earlier--show-resolver-actions. π-O<order>,--sort<order>β specify the order in which output from thesearchandversionscommands should be displayed. Like, passing βinstallsizeβ for<order>will list packages in order according to their size when installed (see the section βCustomizing how packages are sortedβ in the aptitude reference manual for more info π).
Prepending the order keyword with a tilde character (~) reverses the order from ascending to descending. π
The default sort order is name,version.
-o<key>=<value>β set a configuration file option directly; for instance, use-o Aptitude::Log=/tmp/my-logto log aptitude's actions to/tmp/my-log. For more info on configuration file options, see the section βConfiguration file referenceβ in the aptitude reference manual. π-P,--promptβ always display a prompt before downloading, installing or removing packages, even when no actions other than those explicitly requested will be performed. π«Ά
This corresponds to the configuration option Aptitude::CmdLine::Always-Prompt.
--purge-unusedβ ifAptitude::Delete-Unusedis set to βtrueβ (which is its default), then on top of removing each package that is no longer required by any installed package, aptitude will also purge them, removing their configuration files and perhaps other important data. For more info about which packages count as βunusedβ, see the section βManaging Automatically Installed Packagesβ in the aptitude reference manual.
THIS OPTION CAN CAUSE DATA LOSS! DO NOT USE IT UNLESS YOU KNOW WHAT YOU ARE DOING! ππ
This corresponds to the configuration option Aptitude::Purge-Unused.
-q[=<n>],--quiet[=<n>]β suppress all incremental progress indicators, which makes the output loggable. This may be supplied multiple times to make the program quieter, but unlikeapt-get, aptitude does not enable-ywhen-qis supplied more than once. π€«
The optional =<n> may be used to directly set the amount of quietness (for instance, to override a setting in /etc/apt/apt.conf); it causes the program to behave as if -q had been passed exactly <n> times.
-R,--without-recommendsβ don't treat recommendations as dependencies when installing new packages (this overrides settings in/etc/apt/apt.confand~/.aptitude/config). Packages previously installed due to recommendations will not be removed. π«β¨
This corresponds to the pair of configuration options APT::Install-Recommends and APT::AutoRemove::RecommendsImportant.
-r,--with-recommendsβ treat recommendations as dependencies when installing new packages (this overrides settings in/etc/apt/apt.confand~/.aptitude/config). π
This corresponds to the configuration option APT::Install-Recommends
--remove-user-tag<tag>β forfull-upgrade,safe-upgrade,forbid-version,hold,install,keep-all,markauto,unmarkauto,purge,reinstall,remove,unhold, andunmarkauto: remove the user tag<tag>from all packages that are installed, removed, or upgraded by this command, as if with theadd-user-tagcommand. π·οΈ--remove-user-tag-from<tag>,<pattern>β forfull-upgrade,safe-upgrade,forbid-version,hold,install,keep-all,markauto,unmarkauto,purge,reinstall,remove,unhold, andunmarkauto: remove the user tag<tag>from all packages that match<pattern>, as if with theremove-user-tagcommand. The pattern is a search pattern as described in the section βSearch Patternsβ in the aptitude reference manual. π
For instance, aptitude safe-upgrade --remove-user-tag-from "not-upgraded,?action(upgrade)" will remove the not-upgraded tag from all packages that the safe-upgrade command is able to upgrade. π―
-s,--simulateβ in command-line mode, print the actions that would normally be performed, but don't actually perform them. This does not require root privileges. In the visual interface, it always opens the cache in read-only mode regardless of whether you are root. π»
This corresponds to the configuration option Aptitude::Simulate.
--safe-resolverβ when package dependency problems are encountered, use a βsafeβ algorithm to solve them. This resolver attempts to preserve as many of your choices as possible; it will never remove a package or install a version of a package other than the package's default candidate version. It's the same algorithm used insafe-upgrade; indeed,aptitude --safe-resolver full-upgradeis equivalent toaptitude safe-upgrade. Becausesafe-upgradealways uses the safe resolver, it does not accept the--safe-resolverflag. π‘οΈ
This option is equivalent to setting the configuration variable Aptitude::Always-Use-Safe-Resolver to true.
--schedule-onlyβ for commands that modify package states, schedule operations to be performed in the future, but don't perform them. You can execute scheduled actions by runningaptitude installwith no arguments. This is equivalent to making the corresponding selections in visual mode, then exiting the program normally. π
For instance, aptitude --schedule-only install evolution will schedule the evolution package for later installation.
--show-package-names<when>β controls when theversionscommand shows package names. These are the allowed settings:always: display package names every time thataptitude versionsruns. πauto: display package names whenaptitude versionsruns if the output is not grouped by package, and either there is a pattern-matching argument or there is more than one argument.never: never display package names in the output ofaptitude versions. π ββοΈ
This option corresponds to the configuration item Aptitude::CmdLine::Versions-Show-Package-Names.
--show-resolver-actionsβ display the actions performed by the βsafeβ resolver and bysafe-upgrade. π
When executing the command safe-upgrade or when the option --safe-resolver is present, aptitude will display a summary of the actions performed by the resolver before printing the installation preview. This is equivalent to the configuration option Aptitude::Safe-Resolver::Show-Resolver-Actions.
--show-summary[=<MODE>]β changes the behavior of βaptitude whyβ so it summarizes each dependency chain that it outputs, rather than displaying it in long form. If this option is present and<MODE>is not βno-summaryβ, chains that containSuggestsdependencies will not be displayed: combine--show-summarywith-vto see a summary of all the reasons for the target package to be installed. π§
<MODE> can be any one of the following:
no-summary: don't show a summary (the default behavior if--show-summaryis not present).first-package: display the first package in each chain. This is the default value of<MODE>if it is not present.first-package-and-type: display the first package in each chain, along with the strength of the weakest dependency in the chain.all-packages: briefly display each chain of dependencies leading to the target package.all-packages-with-dep-versions: briefly display each chain of dependencies leading to the target package, including the target version of each dependency.
This option corresponds to the configuration item Aptitude::CmdLine::Show-Summary; if --show-summary is present on the command-line, it will override Aptitude::CmdLine::Show-Summary.
Example 12. Usage of --show-summary β¨
--show-summary used with -v to display all the reasons a package is installed:
$ aptitude -v --show-summary why foomatic-db
Packages requiring foomatic-db:
cupsys-driver-gutenprint
foomatic-db-engine
foomatic-db-gutenprint
foomatic-db-hpijs
foomatic-filters-ppds
foomatic-gui
kde
printconf
wine
Look at all those packages pulling up like excuse me bestie ππ iconic behavior honestly.
$ aptitude -v --show-summary=first-package-and-type why foomatic-db
Packages requiring foomatic-db:
[Depends] cupsys-driver-gutenprint
[Depends] foomatic-db-engine
[Depends] foomatic-db-gutenprint
[Depends] foomatic-db-hpijs
[Depends] foomatic-filters-ppds
[Depends] foomatic-gui
[Depends] kde
[Depends] printconf
[Depends] wine
$ aptitude -v --show-summary=all-packages why foomatic-db
Packages requiring foomatic-db:
cupsys-driver-gutenprint D: cups-driver-gutenprint D: cups R: foomatic-filters R: foomatic-db-engine D: foomatic-db
foomatic-filters-ppds D: foomatic-filters R: foomatic-db-engine D: foomatic-db
kde D: kdeadmin R: system-config-printer-kde D: system-config-printer R: hal-cups-utils D: cups R: foomatic-filters R: foomatic-db-engine D: foomatic-db
wine D: libwine-print D: cups-bsd R: cups R: foomatic-filters R: foomatic-db-engine D: foomatic-db
foomatic-db-engine D: foomatic-db
foomatic-db-gutenprint D: foomatic-db
foomatic-db-hpijs D: foomatic-db
foomatic-gui D: python-foomatic D: foomatic-db-engine D: foomatic-db
printconf D: foomatic-db
$ aptitude -v --show-summary=all-packages-with-dep-versions why foomatic-db
Packages requiring foomatic-db:
cupsys-driver-gutenprint D: cups-driver-gutenprint (>= 5.0.2-4) D: cups (>= 1.3.0) R: foomatic-filters (>= 4.0) R: foomatic-db-engine (>= 4.0) D: foomatic-db (>= 20090301)
foomatic-filters-ppds D: foomatic-filters R: foomatic-db-engine (>= 4.0) D: foomatic-db (>= 20090301)
kde D: kdeadmin (>= 4:3.5.5) R: system-config-printer-kde (>= 4:4.2.2-1) D: system-config-printer (>= 1.0.0) R: hal-cups-utils D: cups R: foomatic-filters (>= 4.0) R: foomatic-db-engine (>= 4.0) D: foomatic-db (>= 20090301)
wine D: libwine-print (= 1.1.15-1) D: cups-bsd R: cups R: foomatic-filters (>= 4.0) R: foomatic-db-engine (>= 4.0) D: foomatic-db (>= 20090301)
foomatic-db-engine D: foomatic-db
foomatic-db-gutenprint D: foomatic-db
foomatic-db-hpijs D: foomatic-db
foomatic-gui D: python-foomatic (>= 0.7.9.2) D: foomatic-db-engine D: foomatic-db (>= 20090301)
printconf D: foomatic-db
π
and wayyy back in the day, --show-summary would just squish a whole chain onto one single line:
$ aptitude --show-summary=all-packages why aptitude-gtk libglib2.0-data
Packages requiring libglib2.0-data:
aptitude-gtk D: libglib2.0-0 R: libglib2.0-data
-trelease,--target-releaserelease β picks which release packages should be installed from. Like,aptitude -t experimental ...installs things from the experimental distribution unless you say otherwise. β¨
This changes the default candidate version of your packages according to the rules in apt_preferences(5).
It corresponds to the config item APT::Default-Release.
-V,--show-versionsβ shows which versions of packages are getting installed.
Corresponds to the config option Aptitude::CmdLine::Show-Versions.
-v,--verboseβ makes some commands (likeshow) spill extra info. Stack it multiple times and you get more and more and more. π«Ά
Corresponds to the config option Aptitude::CmdLine::Verbose.
--versionβ shows the aptitude version plus a lil bit of info about how it was compiled.--visual-previewβ when you're installing or removing packages from the command line, instead of showing the usual prompt, it boots up the visual interface and displays its preview screen. main character energy honestly. π-W,--show-whyβ in the preview shown before packages get installed or removed, it shows which manually installed package requires each automatically installed package. For example:
$ aptitude --show-why install mediawiki
...
The following NEW packages will be installed:
libapache2-mod-php5{a} (for mediawiki) mediawiki php5{a} (for mediawiki)
php5-cli{a} (for mediawiki) php5-common{a} (for mediawiki)
php5-mysql{a} (for mediawiki)
When you combine it with -v or a non-zero value for Aptitude::CmdLine::Verbose, it shows the entire chain of dependencies that lead each package to be installed. Like:
$ aptitude -v --show-why install libdb4.2-dev
The following NEW packages will be installed:
libdb4.2{a} (libdb4.2-dev D: libdb4.2) libdb4.2-dev
The following packages will be REMOVED:
libdb4.4-dev{a} (libdb4.2-dev C: libdb-dev P<- libdb-dev)
This option also describes why packages are being removed, like above. In this example, libdb4.2-dev conflicts with libdb-dev, which is provided by libdb-dev.
This argument corresponds to the config option Aptitude::CmdLine::Show-Why and displays the same information computed by aptitude why and aptitude why-not.
-wwidth,--widthwidth β sets the display width used for output from thesearchandversionscommands (on the command line).
By default, and when you're seeing the output directly in a terminal, the terminal width is used. When the output is redirected or piped, a very large "unlimited" line width is used, and this option gets ignored. π
Corresponds to the config option Aptitude::CmdLine::Package-Display-Width.
-y,--assume-yesβ when a yes/no prompt would pop up, it just assumes you typed "yes". Specifically, it suppresses the prompt that appears when installing, upgrading, or removing packages. Prompts for "dangerous" actions, like removing essential packages, will still show up. This option overrides-P.
Corresponds to the config option Aptitude::CmdLine::Assume-Yes.
-Zβ shows how much disk space each individual package being installed, upgraded, or removed will use or free. π
Corresponds to the config option Aptitude::CmdLine::Show-Size-Changes.
The following options apply to the visual mode of the program, but they're primarily for internal use; you generally won't need to use them yourself. ngl they're a lil niche. π
--autoclean-on-startupβ deletes old downloaded files when the program starts (same thing as starting the program and immediately selecting Actions β Clean obsolete files). You cannot use this option and--clean-on-startup,-i, or-uat the same time.--clean-on-startupβ cleans the package cache when the program starts (same as starting the program and immediately selecting Actions β Clean package cache). You cannot use this option and--autoclean-on-startup,-i, or-uat the same time.-iβ displays a download preview when the program starts (same as starting the program and immediately pressing "g"). You cannot use this option and--autoclean-on-startup,--clean-on-startup, or-uat the same time.-Sfname β loads the extended state information from fname instead of the standard state file.-uβ begins updating the package lists as soon as the program starts. You cannot use this option and--autoclean-on-startup,--clean-on-startup, or-iat the same time.
π¦ ENVIRONMENT π¦
HOMEβ if$HOME/.aptitudeexists, aptitude stores its config file in$HOME/.aptitude/config. Otherwise, it looks up the current user's home directory usinggetpwuid(2)and places its config file there. πPAGERβ if this environment variable is set, aptitude uses it to display changelogs whenaptitude changelogis invoked. If it's not set, it defaults tomore.TMPβ ifTMPDIRis unset, aptitude stores its temporary files inTMPif that variable is set. Otherwise, it stores them in/tmp.TMPDIRβ aptitude stores its temporary files in the directory this environment variable points to. IfTMPDIRisn't set, thenTMPis used; ifTMPis also unset, then aptitude uses/tmp.
π FILES π
/var/lib/aptitude/pkgstatesβ the file where stored package states and some package flags live. π¦/etc/apt/apt.conf,/etc/apt/apt.conf.d/*,~/.aptitude/configβ the config files for aptitude.~/.aptitude/configoverrides/etc/apt/apt.conf. Seeapt.conf(5)for documentation of the format and contents of these files.
β¨ SEE ALSO β¨
apt-get(8), apt(8), /usr/share/doc/aptitude/html/<lang>/index.html from the package aptitude-doc-<lang>
π AUTHORS π
Daniel Burrows <dburrows@debian.org>β main author of the document. π«ΆManuel A. Fernandez Montecelo <mafm@debian.org>β main maintainer after Daniel Burrows, documentation about new features, corrections and formatting.
π COPYRIGHT π
Copyright 2004-2011 Daniel Burrows.
Copyright 2014-2016 Manuel A. Fernandez Montecelo
This manual page is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This manual page is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
and that's the whole thing bestie, we ate and left no crumbs π this was aptitude 0.8.13, dated 02/04/2026, living in APTITUDE(8) β go forth and manage your packages, ily βπΈ
π¦ where this page comes from
- ubuntu resolute: aptitude-common 0.8.13-7ubuntu5 Β· GPL-2.0-or-later
- ubuntu stonking: aptitude-common 0.8.13-7ubuntu5 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms