Debian Aptitude

Pack It Up

If you run Debian and need to download, install, update, upgrade, remove, or search for software there's a good chance you use apt-get or aptitude. If you're an apt-get user give aptitude a try. Its as easy as apt-get and has additional benefits.

Before we go any further, its important you have the correct source files listed, added or appended in your /etc/apt/ directory. These must include your current Debian version and any contrib / non-free repositories you need.

Change directory to /etc/apt/ and edit sources.list. Add "contrib" and "non-free" to the end of your sources list so it looks something like this:

deb http://ftp.uk.debian.org/debian/ squeeze main contrib non-free
deb-src http://ftp.uk.debian.org/debian/ squeeze main contrib non-free

deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free

Aptitude is dead easy to use once you master a few simple commands in an XTerm or Gnome-Terminal.

To search for stuff:

aptitude search stuff-your-looking-for

Aptitude will return results and if it does not get what you want, you'll get suggestions. That is great. If your not sure what the package is called and search on "update" you get:

root@apache:/home/patrick/Downloads# aptitude search update
p copyright-update - update copyright information in files
p ez-ipupdate - client for most dynamic DNS services
p freepops-updater-fltk - Graphical interface for the freepops updater en
p freepops-updater-gnome - GNOME interface for the freepops updater engine
p hildon-update-category-database - Hildon desktop MIME type hander - mapping tool
p langupdate - locate updated language files in Emdebian
p libqrupdate-dev - Fast updates of QR and Cholesky decompositions
p libqrupdate1 - Fast updates of QR and Cholesky decompositions
p nss-updatedb - Cache name service directories in DB format
i A update-inetd - inetd configuration file updater
i A update-manager-core - APT update manager core functionality
p update-manager-doc - Update Manager API documentation
i A update-manager-gnome - GNOME application that manages software updates
i A update-notifier - Daemon which notifies about package updates
i A update-notifier-common - Files shared between update-notifier and adept
p xmms2-client-medialib-updater - XMMS2 - medialib-updater client

You get all packages with "update" in the name.

To install stuff:

aptitude install stuff-your-looking-for

To remove stuff:

aptitude install stuff-your-looking-for

To update aptitude database file to match current repositories:

aptitude update

To upgrade your installed packages:

aptitude safe-upgrade

These commands will get you started on using Debian's aptitude.

Want to know more? Read the online aptitude manual.

Done!