Tombuntu

Don't Apt-Get, Aptitude

In Debian based distributions, by default there are two ways to manage packages on the command line: apt-get and aptitude. The better of the two is aptitude. In fact, it looks like the only advantage apt-get has over aptitude is the easier name.

The problem is in removing packages. You see, apt-get does a great job of indentifying what dependencies need to be installed when you want a certain package, but it fails miserably when you want to remove that package. If dependencies were required, ‘apt-get remove’ will remove your packages, but leave orphaned dependencies on your system.

Here are the basic commands to get you started with aptitude:

aptitude install packagename
aptitude remove packagename
aptitude update
aptitude upgrade

Running aptitude with no options will bring up a text-based GUI.

Archived Comments

Christoph Langner

In my opinion it is a bad thing to recommend aptitude. Using aptitude forces you to not use any frontends of apt any more since you break aptitudes own database when you mixe apt-get based frontends and aptitude. Since apt-get has the option “autoremove” aptitude is obsulet.

Azrael Nightwalker

Try wajig - it can do much more than aptitude. Just see the output of ‘wajig commands’

Alan Pope

You can of course use “apt-get autoremove ” which will remove the package _and_ its dependents just fine.

onan

how far back in the past do you live to still perpetuate such an old thing. apt-get features the autoremove option to remove any leftover dependencies since 2006.

besides, comparing apt-get and aptitude makes absolutely no sense as aptitude is a frontend to the apt tools. it would like comparing dselect to dpkg.

Raphaël Hertzog

Besides apt-get autoremove that other commenters already noted, I would like to add that there are important differences in the way apt-get and aptitude manage dist-upgrades. So aptitude is not always superior to apt-get and in fact the Squeeze release notes recommended the usage of apt-get because aptitude failed to work reliably.

You might also be interested by my article apt-get, aptitude, … pick the right package manager for you.

Respond via email