An Ncurses and command-line front-end for package management. For basic usage, see AptCLI. For package management generally, see PackageManagement.
Aptitude has a number of useful features, including:
a mutt-like syntax for matching packages
- preview actions about to be taken with different colors marking different actions
persistence of user actions (similar to dselect)
- interactively retrieve and display the Debian changelog for packages
apt-like command line mode (aptitude install foo)
- score-based dependency resolver is more suitable for interactive dependency resolution
- lets you add hints like "keep this part of the solution" or "drop that part of the solution"
Interactive Use
To run interactively, enter the following from a terminal emulator:
aptitude
After running it, use:
F10 or Ctrl-T to access the menu.
? for help
The up, down, left, right keys to navigate.
The Enter key to select or open and close a single level
The bracket keys ([ and ]) to open and close levels recursively
The + or - key to install/update or remove a package
The g key to preview/confirm actions
q to quit – this also closes the currently open window (g goes forward, q goes back)
Forward and backward slash (/ and \) for searching forward or backward.
When reviewing dependency resolutions (shown after pressing e), press:
cursor keys or vi-style j/k keys to select actions or action groups
a to explicitly insist on an action (use again to go back to no specific decision)
r to reject an action (use again to go back to no specific decision)
dot (.) to show the next proposed dependency resolution
comma (,) to show the previous proposed dependency resolution
exclamation mark (!) to accept the currently shown dependency resolution
When reviewing pending actions, press:
g again to go ahead and execute the pending actions
q to go back to the previous view
See Accessing package information to understand the letters in the package synopsis line (e.g., i means "will be installed", p means "not installed", etc.)
The most common way to use aptitude is:
run aptitude
press u to update the lists of available packages
press U to mark all upgradable packages to be upgraded
- optionally search/select some packages to install
press g to see the pending actions and modify them if needed
press g again to start the download
{i} When you need to resolve conflicts, but you discover that you made a mistake; use Actions > Cancel pending actions to start again.
Advanced search patterns
Look for packages installed from anything other than stable:
aptitude search '?narrow(?installed, !?archive(stable))'
Look for packages installed from testing (assuming you have sources lists with stable and testing repositories):
aptitude search '?narrow(?installed, ?archive(testing) !?archive(stable))'
List contrib, non-free, or non-free-firmware packages installed:
aptitude search '~i ?section(non-free)' aptitude search '~i ?section(contrib)' aptitude search '~i ?section(non-free-firmware)'
For more information about searching, see the aptitude search term reference
See Also
- Aptitude User Manual
or change the en in the URL to your preferred language code
a plain-text user manual in English: /usr/share/doc/aptitude/README
installed along with aptitude
local version of the web-based manual: /usr/share/doc/aptitude/html/en/index.html
install aptitude-doc-en to get this file
or change the en in the package name to your preferred language code
Aptitude in the Debian Package Management Book (German only)
Use Aptitude to restore an installed package permissions to their default
and ... apt.conf, preferences, sources.list, Aptitude::Parse-Description-Bullets=true, AptitudeTodo
Other content
This page used to be much longer - general information about managing packages on the command line has been moved to AptCLI, while abstract guidance about package managers has been moved to DebianPackageManagement.