APTITUDE(8) Command-Line Reference APTITUDE(8)
NAME
aptitude - high-level interface to the package manager
SYNOPSIS
aptitude [...] {autoclean | clean | forget-new | keep-all |
update | upgrade}
aptitude [...] {changelog | dist-upgrade | download |
forbid-version | hold | install | keep-all | markauto | purge
| reinstall | remove | show | unhold | unmarkauto}
...
aptitude [...] search ...
aptitude [-S ] [-u | -i]
aptitude help
DESCRIPTION
aptitude is a text-based interface to the Debian GNU/Linux package
system.
It allows the user to view the list of packages and to perform package
management tasks such as installing, upgrading, and removing packages.
Actions may be performed from a visual interface or from the
command-line.
COMMAND-LINE ACTIONS
The first argument which does not begin with a hyphen (\fB-\fR) 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:
\fBinstall\fR
Install one or more packages. The packages should be listed after
the install command; if a package name contains a tilde character
(\fB~\fR), 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
\fB=\fR to the package name: for instance, \fBaptitude
install apt=0.3.1\fR. Similarly, to select a package from a
particular archive, append \fB/\fR to the package name:
for instance, \fBaptitude install apt/experimental\fR.
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, \fBaptitude remove wesnoth+\fR will install \fBwesnoth\fR,
not remove it. The following override specifiers are available:
\fB+\fR
Install .
\fB+M\fR
Install and immediately mark it as automatically
installed (note that if nothing depends on , this will
cause it to be immediately removed).
\fB-\fR
Remove .
\fB_\fR
Purge : remove it and all its associated configuration
and data files.
\fB=\fR
Place on hold: cancel any active installation,
upgrade, or removal, and prevent this package from being
automatically upgraded in the future.
\fB:\fR
Keep at its current version: cancel any installation,
removal, or upgrade. Unlike hold (above) this does not
prevent automatic upgrades in the future.
\fB&M\fR
Mark as having been automatically installed.
\fB&m\fR
Mark as having been manually installed.
As a special case, \fBinstall\fR with no arguments will act on
any stored/pending actions.
Note
Once you enter Y at the final confirmation prompt, the
\fBinstall\fR command will modify aptitudes stored information
about what actions to perform. Therefore, if you issue (e.g.) the
command \fBaptitude install foo bar\fR and then abort the
installation once aptitude has started downloading and installing
packages, you will need to run \fBaptitude remove foo bar\fR to
cancel that order.
\fBremove\fR, \fBpurge\fR, \fBhold\fR, \fBunhold\fR, \fBkeep\fR,
\fBreinstall\fR
These commands are the same as \fBinstall\fR, but apply the named
action to all packages given on the command line for which it is
not overridden. The difference between \fBhold\fR and \fBkeep\fR is
that \fBhold\fR will cause a package to be ignored by future
\fBupgrade\fR commands, while \fBkeep\fR merely cancels any
scheduled actions on the package. \fBunhold\fR will cause a
package to be upgraded by future \fBupgrade\fR commands, without
otherwise altering its state.
For instance, \fBaptitude remove ~ndeity\fR will remove all
packages whose name contains \fBdeity\fR.
\fBmarkauto\fR, \fBunmarkauto\fR
Mark packages as automatically installed or manually installed,
respectively. Packages are specified in exactly the same way as for
the \fBinstall\fR command. For instance, \fBaptitude markauto
~slibs\fR will mark all packages in the \fBlibs\fR 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.
\fBforbid-version\fR
Forbid a package from being upgraded to a particular version. This
will prevent aptitude from automatically upgrading to this version,
but will allow automatic upgrades to future versions. By default,
aptitude will select the version to which the package would
normally be upgraded; you may override this selection by appending
\fB=\fR to the package name: for instance, \fBaptitude
forbid-version vim=1.2.3.broken-4\fR.
This command is useful for avoiding broken versions of packages
without having to set and clear manual holds. If you decide you
really want the forbidden version after all, the \fBinstall\fR
command will remove the ban.
\fBupdate\fR
Updates the list of available packages from the apt sources (this
is equivalent to \fBapt-get update\fR)
\fBupgrade\fR
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 will
not be installed.
If a package cannot be upgraded without violating these
constraints, it will be kept at its current version. Use the
\fBdist-upgrade\fR command to upgrade these packages as well.
\fBdist-upgrade\fR
Upgrades installed packages to their most recent version, removing
or installing packages as necessary. This command is less
conservative than \fBupgrade\fR and thus more likely to perform
unwanted actions. Users are advised to either use \fBupgrade\fR
instead or to carefully inspect the list of packages to be
installed and removed.
\fBkeep-all\fR
Cancels all scheduled actions on all packages; any packages whose
sticky state indicates an installation, removal, or upgrade will
have this sticky state cleared.
\fBforget-new\fR
Forgets all internal information about what packages are new
(equivalent to pressing f when in visual mode).
\fBsearch\fR
Searches for packages matching one of the patterns supplied on the
command line. All packages which match any of the given patterns
will be displayed; for instance, \fBaptitude search ~N\fR will
list all new packages. For more information on search patterns,
see the section Search Patterns in the aptitude reference manual.
Unless you pass the \fB-F\fR option, the output of \fBaptitude
search\fR will look 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 is listed on a separate line. The first
character of each line indicates the current state of the package:
the most common states are \fBp\fR, meaning that no trace of the
package exists on the system, \fBc\fR, meaning that the package was
deleted but its configuration files remain on the system, \fBi\fR,
meaning that the package is installed, and \fBv\fR, meaning that
the package is virtual. The second character indicates the stored
action (if any; otherwise a blank space is displayed) to be
performed on the package, with the most common actions being
\fBi\fR, meaning that the package will be installed, \fBd\fR,
meaning that the package will be deleted, and \fBp\fR, meaning that
the package and its configuration files will be removed. If the
third character is \fBA\fR, the package was automatically
installed.
For a complete list of the possible state and action flags, see the
section Accessing Package Information in the aptitude reference
guide.
\fBshow\fR
Displays detailed information about one or more packages, listed
following the search command. If a package name contains a tilde
character (\fB~\fR), it will be treated as a search pattern and
all matching packages will be displayed (see the section Search
Patterns in the aptitude reference manual).
If the verbosity level is 1 or greater (i.e., at least one \fB-v\fR
is present on the command-line), information about all versions of
the package is displayed. Otherwise, information about the
candidate version (the version that \fBaptitude install\fR
would download) is displayed.
You can display information about a different version of the
package by appending \fB=\fR to the package name; you can
display the version from a particular archive by appending
\fB/\fR to the package name. If either of these is
present, then only the version you request will be displayed,
regardless of the verbosity level.
If the verbosity level is 1 or greater, the packages architecture,
compressed size, filename, and md5sum fields will be displayed. If
the verbosity level is 2 or greater, the select version or versions
will be displayed once for each archive in which they are found.
\fBclean\fR
Removes all previously downloaded \fB.deb\fR files from the package
cache directory (usually /var/cache/apt/archives).
\fBautoclean\fR
Removes any cached packages which can no longer be downloaded. This
allows you to prevent a cache from growing out of control over time
without completely emptying it.
\fBchangelog\fR
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 \fBaptitude install\fR is downloaded. You can select a
particular version of a package by appending \fB=\fR to
the package name; you can select the version from a particular
archive by appending \fB/\fR to the package name.
\fBdownload\fR
Downloads the \fB.deb\fR file for the given package to the current
directory.
By default, the version which would be installed with \fBaptitude
install\fR is downloaded. You can select a particular version of a
package by appending \fB=\fR to the package name; you can
select the version from a particular archive by appending
\fB/\fR to the package name.
\fBhelp\fR
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 dont apply to particular commands and will be
ignored by those commands.
\fB-D\fR, \fB--show-deps\fR
For commands that will install or remove packages (\fBinstall\fR,
\fBupgrade\fR, etc), show brief explanations of automatic
installations and removals.
This corresponds to the configuration option
\fBAptitude::CmdLine::Show-Deps\fR.
\fB-d\fR, \fB--download-only\fR
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
\fBAptitude::CmdLine::Download-Only\fR.
\fB-F\fR , \fB--display-format\fR
Specify the format which should be used to display output from the
\fBsearch\fR command. For instance, passing \fB%p %V %v\fR for
will display a packages name, followed by its currently
installed version and its available version (see the section
Customizing how packages are displayed in the aptitude reference
manual for more information).
This corresponds to the configuration option
\fBAptitude::CmdLine::Package-Display-Format\fR.
\fB-f\fR
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
\fBAptitude::CmdLine::Fix-Broken\fR.
\fB-h\fR, \fB--help\fR
Display a brief help message. Identical to the \fBhelp\fR action.
\fB--purge-unused\fR
Purge packages that are no longer required by any installed
package. This is equivalent to passing \fB-o
Aptitude::Purge-Unused=true\fR as a command-line argument.
\fB-P\fR, \fB--prompt\fR
Always display a prompt, even when no actions other than those
explicitly requested will be performed.
This corresponds to the configuration option
\fBAptitude::CmdLine::Always-Prompt\fR.
\fB-R\fR, \fB--without-recommends\fR
Do not treat recommendations as dependencies when installing new
packages (this overrides settings in /etc/apt/apt.conf and
~/.aptitude/config).
This corresponds to the configuration option
\fBAptitude::Recommends-Important\fR
\fB-r\fR, \fB--with-recommends\fR
Treat recommendations as dependencies when installing new packages
(this overrides settings in /etc/apt/apt.conf and
~/.aptitude/config).
This corresponds to the configuration option
\fBAptitude::Recommends-Important\fR
\fB-s\fR, \fB--simulate\fR
In command-line mode, print the actions that would normally be
performed, but dont actually perform them. This does not require
root privileges. In the visual interface, always open the cache in
read-only mode regardless of whether you are root.
This corresponds to the configuration option
\fBAptitude::Simulate\fR.
\fB--schedule-only\fR
For commands that modify package states, schedule operations to be
performed in the future, but dont perform them. You can execute
scheduled actions by running \fBaptitude install\fR with no
arguments. This is equivalent to making the corresponding
selections in visual mode, then exiting the program normally.
For instance, \fBaptitude --schedule-only install evolution\fR will
schedule the \fBevolution\fR package for later installation.
\fB-t\fR , \fB--target-release\fR
Set the release from which packages should be installed. For
instance, \fBaptitude -t experimental ...\fR will install
packages from the experimental distribution unless you specify
otherwise. For the command-line actions changelog, download,
and show, this is equivalent to appending \fB/\fR to
each package named on the command-line; for other commands, this
will affect the default candidate version of packages according to
the rules described in apt_preferences(5).
This corresponds to the configuration item
\fBAPT::Default-Release\fR.
\fB-O\fR , \fB--sort\fR
Specify the order in which output from the \fBsearch\fR command
should be displayed. For instance, passing \fBinstallsize\fR for
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 information).
\fB-o\fR \fB=\fR
Set a configuration file option directly; for instance, use \fB-o
Aptitude::Log=/tmp/my-log\fR to log aptitudes actions to
/tmp/my-log. For more information on configuration file options,
see the section Configuration file reference in the aptitude
reference manual.
\fB-q[=]\fR, \fB--quiet[=]\fR
Suppress all incremental progress indicators, thus making the
output loggable. This may be supplied multiple times to make the
program quieter, but unlike apt-get, aptitude does not enable
\fB-y\fR when \fB-q\fR is supplied more than once.
The optional \fB=\fR 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 \fB-q\fR
had been passed exactly times.
\fB-V\fR, \fB--show-versions\fR
Show which versions of packages will be installed.
This corresponds to the configuration option
\fBAptitude::CmdLine::Show-Versions\fR.
\fB-v\fR, \fB--verbose\fR
Causes some commands (for instance, \fBshow\fR) to display extra
information. This may be supplied multiple times to get more and
more information.
This corresponds to the configuration option
\fBAptitude::CmdLine::Verbose\fR.
\fB--version\fR
Display the version of aptitude and some information about how it
was compiled.
\fB--visual-preview\fR
When installing or removing packages from the command line, instead
of displaying the usual prompt, start up the visual interface and
display its preview screen.
\fB-w\fR , \fB--width\fR
Specify the display width which should be used for output from the
\fBsearch\fR command (by default, the terminal width is used).
This corresponds to the configuration option
\fBAptitude::CmdLine::Package-Display-Width\fR
\fB-y\fR, \fB--assume-yes\fR
When a yes/no prompt would be presented, assume that the user
entered yes. In particular, suppresses the prompt that appears
when installing, upgrading, or removing packages. Prompts for
dangerous actions, such as removing essential packages, will
still be displayed. This option overrides \fB-P\fR.
This corresponds to the configuration option
\fBAptitude::CmdLine::Assume-Yes\fR.
\fB-Z\fR
Show how much disk space will be used or freed by the individual
packages being installed, upgraded, or removed.
This corresponds to the configuration option
\fBAptitude::CmdLine::Show-Size-Changes\fR.
The following options apply to the visual mode of the program, but are
primarily for internal use; you generally wont need to use them
yourself.
\fB-S\fR
Loads the extended state information from instead of the
standard state file.
\fB-u\fR
Begins updating the package lists as soon as the program starts.
You cannot use this option and \fB-i\fR at the same time.
\fB-i\fR
Displays a download preview when the program starts (equivalent to
starting the program and immediately pressing g). You cannot use
this option and \fB-u\fR at the same time.
ENVIRONMENT
\fBHOME\fR
If $HOME/.aptitude exists, aptitude will store its configuration
file in $HOME/.aptitude/config. Otherwise, it will look up the
current users home directory using getpwuid(2) and place its
configuration file there.
\fBPAGER\fR
If this environment variable is set, aptitude will use it to
display changelogs when \fBaptitude changelog\fR is invoked. If
not set, it defaults to \fBmore\fR.
\fBTMP\fR
If \fBTMPDIR\fR is unset, aptitude will store its temporary files
in \fBTMP\fR if that variable is set. Otherwise, it will store them
in /tmp.
\fBTMPDIR\fR
aptitude will store its temporary files in the directory indicated
by this environment variable. If \fBTMPDIR\fR is not set, then
\fBTMP\fR will be used; if \fBTMP\fR is also unset, then aptitude
will use /tmp.
SEE ALSO
apt-get(8), apt(8), /usr/share/doc/aptitude/html//index.html from
the package aptitude-doc-
AUTHOR
Daniel Burrows
Author.
COPYRIGHT
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.
03/14/2007 APTITUDE(8)
|