When I first started with Ubuntu using aptitude
was the 'in-thing', with some stated improvements over apt-get
. Am I correct in saying that apt-get
has now 'caught up' with aptitude
, and it makes little difference which is used (although it is preferable to choose one or the other, and stick with it)?
Moreover, with aptitude
set to be removed from a default Ubuntu install, should everyone revert to apt-get
, especially when guiding new users interested in the CLI?
As far as I can see, in 10.04, the main differences between aptitude and apt-get are:
aptitude
adds explicit per-package flags, indicating whether a package was automatically installed to satisfy a dependency: you can manipulate those flags (aptitude markauto
oraptitude unmarkauto
) to change the way aptitude treats the package.apt-get
keeps track of the same information, but will not show it explicitly.apt-mark
can be used for manipulating the flags.aptitude
will offer to remove unused packages each time you remove an installed package, whereasapt-get
will only do that if explicitly asked to withapt-get autoremove
or specify--auto-remove
.aptitude
acts as a single command-line front-end to most of the functionalities in bothapt-get
andapt-cache
. Note: As of 16.04, there is anapt
command that includes the most commonly used commands fromapt-get
andapt-cache
and a few extra features.In contrast to
apt-cache
's "search",aptitude
's "search" output also shows the installed/removed/purged status of a package (plus aptitude's own status flags). Also, the "install" output marks which packages are being installed to satisfy a dependency, and which are being removed because unused.aptitude
has a (text-only) interactive UI.I personally use only
aptitude
for my command-line package management (and I never use the text UI); I find its output more readable thanapt-get
/apt-cache
.However, if
aptitude
will be no longer standard on Ubuntu, there's no other choice than useapt-get
in instructions and how-to documents.(Personally, I'm rather disappointed to see it go away in 10.10; especially since the improvements of aptitude over
apt-get
are mostly on the usability side. I guess they deemed that those conversant with the command-line know how to get aptitude back, and those who don't use the command-line will not care...)I guess it's a matter of personal choice by now. I find typing
aptitude search
makes more sense to me thanapt-cache search
, and I like that it tells me which packages I have installed right there in the search output, instead of having to rundpkg -l
.Earlier apt-get would not manage dependencies properly and therefore cause orphaned dependencies to remain in a system even after the package that was using them was uninstalled - this is not longer the case, to remove orphaned dependencies use
aptitude always did this right and tracks dependencies better, but now both package managers do the job.
On ubuntu it is better to use apt-get because its supported and endorsed by the company, on debian I would use aptitude
In addition to the other answers, it's also worth noting that
apt-get
often falls on its face for simple operations, and it has no ability to handle dependency version mismatches or broken packages (although it claims that broken packages can be fixed withapt-get install -f
, I've literally never seen that work in my entire life).For some reason, I still use
apt-get
by default, but when it encounters problems, I usually end up resolving them withaptitude
, which never seems to encounterapt-get
's numerous problems.I would say that in my personal experience aptitude and apt-get have very similar functionality.
The main difference that come to mind that might effect a users choices are, that aptitude offers an ncurses interface and that it offers options for safe-upgrade and full-upgrade that can come in handy.
Personally I always use apt-get and recommend that new users use apt-get as well. With aptitude set to be removed from Ubuntu by default as you said, this still seems to be the best recommendation. As if they did want to use aptitude they will need to know how to use apt-get to install aptitude if they want it :)
On a server I prefer Atitude because it comes with a pretty good interface to check package changelogs, selective upgrades and that kinds of stuff. apt-get is more quick though and I always use that if I just want to update everything without too much hassle.