Some time ago I read that aptitude
is the preferred tool for installation on Debian-based systems. But when you search around on how to administer a Debian-based system, then aptitude is rarely mentioned. Most people seem to prefer apt-get
– and that's even true for the Debian wiki pages!
Thus I am wondering if I have missed something. Which is the right tool to use?
Best Answer
aptitude
andapt-get
work the same for many tasks, but for the most tricky cases, such as distribution upgrades (apt-get dist-upgrade
vs.aptitude full-upgrade
), they have different rules, and aptitude's rules are nearly always better in practice where they disagree.The reason you see more documentation for
apt-get
overaptitude
is mostly inertia:aptitude
has not been the recommended front end to APT for all that long, so much of the existing documentation hasn't been updated, and there are plenty of people who recognise the advantages ofaptitude
overapt-get
but useapt-get
reflexively.I've recently got to the point where I usually follow
apt
with ai
and not a-
when I type.Postscript Note that the rules used in
apt-get
andaptitude
are moving targets - as Hubert notes in comments, the upgrade path recommended from Debian Lenny now usesapt-get
, notaptitude
. This reflects the fact thatapt-get
keeps track of less state about the current package thanaptitude
, and so does not need to worry about APT state not being "clean", and becauseapt-get
rules are smarter than they used to be. I still use and recommendaptitude
overapt-get
, but it is a more nuanced recommendation