aptitude cheatsheet

aptitude is a great alternative to apt-get and the best way to install, remove, upgrade, and otherwise administer packages on you system with apt. aptitude solves orphaned dependencies and has a curses interface that blows the doors off of dselect. Finally, and most importantly, it takes advantage of one tool, doing many many operations:

Syntax Description
aptitude Running it with no arguments brings up a curses based interface to search, navigate, install, update and otherwise administer packages
aptitude install Installing software for your system, installing needed dependencies as well
aptitude -d install Download packages to the package cache as necessary, but do not install or remove anything.
aptitude remove Removing packages as well as orphaned dependencies
aptitude purge Removing packages and orphaned dependencies as well as any configuration files left behind
aptitude search Search for packages in the local apt package lists
aptitude update Update the local packages lists
aptitude upgrade Upgrade any installed packages that have been updated
aptitude clean Delete any downloaded files necessary for installing the software on your system
aptitude dist-upgrade Upgrade packages, even if it means uninstalling certain packages
aptitude show Show details about a package name
aptitude autoclean Delete only out-of-date packages, but keep current ones
aptitude hold Fix a package at it’s current version, and don’t update it

aptitude uses many of the same commands as apt-get. It is not a good idea to use both, you should either use aptitude or apt-get exclusively, or your dependencies might get confused.