Differences between revisions 37 and 38
Revision 37 as of 2009-07-28 14:52:41
Size: 3873
Editor: OmarCampagne
Comment: added g key under Use
Revision 38 as of 2009-10-11 17:58:28
Size: 4288
Comment: created a table for "apt to aptitude" section + link to It translation
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
~-Translations: [[Aptitude|English]] - [[fr/Aptitude|Français]]-~ ~-Translations: [[Aptitude|English]] - [[fr/Aptitude|Français]] - [[it/Aptitude|Italiano]]-~
Line 86: Line 86:
 * Would be nice to make a table out of this:
aptitude install foo was apt-get install foo
aptitude search foo was apt-cache search foo
aptitude remove foo was apt-get remove foo
aptitude ~D foo was apt-cache rdepends foo
aptitude ? was apt-cache policy foo
aptitude ? was apt-get source --compile foo

||'''Action'''||'''apt-get command'''||'''aptitude command'''||
||<style="background-color:#aaccff;">Install foo||apt-get install foo||aptitude install foo||
||<style="background-color:#aaccff;">Search foo||apt-cache search foo||aptitude search foo||
||<style="background-color:#aaccff;">Remove foo||apt-get remove foo||aptitude remove foo||
||<style="background-color:#aaccff;">List reverse dependencies||apt-cache rdepends foo||aptitude ~D foo||
||<style="background-color:#aaccff;">Print information on priorities for foo||apt-cache policy foo||<style="background-color:#FF0000;"> ? ||
||<style="background-color:#aaccff;">Download foo's sources and build a binary .deb package||apt-get source --compile foo||<style="background-color:#FF0000;">?||

Translations: English - Français - Italiano

  • Aptitude is an Ncurses based FrontEnd to Apt, the debian package manager. Since it is text based, it is run from a terminal or a CLI (command line interface). Aptitude has a number of useful features, including:

  • a mutt-like syntax for matching packages in a flexible manner
  • mark packages as "automatically installed" or "manually installed" so that packages can be auto-removed when no longer required

  • colorful preview of actions about to be taken
  • dselect-like persistence of user actions
  • the ability to retrieve and display the Debian changelog of most packages
  • AptCLI-like (= apt-get + apt-cache) command line mode ("aptitude install foo")

  • Score-based and (usually) smarter dependency resolver than apt-get

aptitude is also non-fattening, naturally cleansing, and housebroken.




After running it, use:

  • F10 to access the menu and use aptitude. This is the main key.
  • ? for help
  • The 'up', 'down', 'left', 'right' keys to navigate.
  • The 'Enter' key to select
  • The '+' or '-' key to install/update or remove a package
  • The 'g' key to preview/confirm actions
  • 'q' to quit

The common use of aptitude in TUI (text user interface) is; run aptitude; press 'u' (update the lists of available packages); press 'U' (Mark all upgradable packages to be upgraded); (search/select some stuff to install, is optional); press 'g' (to see the pending actions and modify if needed); press 'g' (again, to start the download).

Some time when you need to resolve conflicts, you discover that you made a mistake; you can easily use 'Cancel pending actions' in the 'Actions' menu so that you can re-select.

You can also use aptitude like in the same manner as apt-get:

Update the packages list:

aptitude update

Upgrade the packages:

aptitude upgrade

Install foo:

aptitude install foo

Remove bar:

aptitude remove bar

Purge foo:

aptitude purge foo

Personally, I still use apt-cache search foo to perform a search -- the aptitude search foo is slower. But you should try the aptitude search foo way. You should discover that the output is a bit different from apt-cache, in some case, it may be useful to search for a package to see if it already installed.

The manual of aptitude is really a gold mine. I don't want to duplicate this useful informations so please take a look there for further help.



How to upgrade your distribution

  • Find out current version of Debian that you are running:

cat /etc/debian_version

Example for upgrading sarge to etch or etch 4.0r1 to 4.0r2 ...etc

aptitude update
aptitude dist-upgrade

apt-get to aptitude


apt-get command

aptitude command

Install foo

apt-get install foo

aptitude install foo

Search foo

apt-cache search foo

aptitude search foo

Remove foo

apt-get remove foo

aptitude remove foo

List reverse dependencies

apt-cache rdepends foo

aptitude ~D foo

Print information on priorities for foo

apt-cache policy foo


Download foo's sources and build a binary .deb package

apt-get source --compile foo


See Also

and ... apt.conf, preferences, sources.list, Aptitude::Parse-Description-Bullets=true, AptitudeTodo