aptitude doesn't suck, actually

I have to say I was a little worried when I saw the installation notice during a recent upgrade of debfoster. It had been deprecated, abandoned by its developers, and instead I was being encouraged to use aptitude. So, I was being forced to give up my favourite package tool for a tool that I’ve started a few times but always found too confusing to invest time in learning.

My first step was the transition from debfoster to aptitude. I tried out the debfoster2aptitude script that was added to the last upgrade of debfoster but quickly realised that it was asking questions on a level that was way too low. I decided to do it manually instead. First I minimised my list of packages in debfoster and saved a copy of it:

# debfoster
# debfoster -qmn
# debfoster -a > ~/debfoster_keepers

Then I turned to aptitude. First I marked all packages as automatically installed (auto) from the command line:

# aptitude markauto '~i'

Then I marked each of the packages in /root/debfoster_keepers as not auto. I did this using the UI, which was both boring and time consuming. It should be easy to wip up a shell script for it, but I felt I needed to get used to aptitude’s UI a bit. After this I went on to see what the damage would be–I hit ‘g’ to add/remove packages. As expected there were a few packages in there that I had to tell aptitude to keep installed for me. No big deal.

One interesting thing about aptitude is that it doesn’t just keep depends of packages, it keeps recommends as well. To see if I could further trim the list of non-auto packages I started looking at the ways to filter the view of packages. I didn’t quite succeed on my own, but after a few emails to the Debian User List I had a nice filter expression:


It will show any installed packages that aren’t auto which are dependencies or recommendations of other packages. In short, packages that aren’t marked auto but could (should?) be. Be aware though that circular depends/recommends prevents all packages in that list to be marked auto.

Another cool thing is the “Audit recommendations” view in aptitude. It’s a great way of finding related packages and improving the functionality of the system. If you want to also see the suggests of installed packages you can change the filter in that view to:


By now I’m not too sad that debfoster is being removed, aptitude actually doesn’t suck :-)

[Edited 01-09-2006 17:11 BST] Fixed a few spelling errors.

Roberto C. Sanchez

Good comments. I was a diehard dselect fan all through Woody and most of the time I was using Sarge while it was testing. It was only just before the stable release of Sarge that I switched to aptitude. I am quite happy that I did.

Leave a comment