Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I was trying to figure out how to install libgtk2.0-dev and found that I have to use

sudo aptitude install

instead of

sudo apt-get install

Why these two different ways of getting stuff?

share|improve this question

5 Answers 5

up vote 11 down vote accepted

apt-get and aptitude are both frontends to dpkg. Use one or the other but be consistent. Aptitude is newer and is suppose to be easier to use. It also unifies some of the apt-* functions. You can use aptitude to search and install while with apt-* you need apt-get and apt-cache for installation and searching respectively.

I usually replace all apt-get examples with aptitude when copying & pasting commands.

Run aptitude without any options to get an interface for selecting packages. I don't ever use it so I don't know how friendly it is.

share|improve this answer

apt-get and aptitude are both interfaces to dpkg, the Debian package manager.

aptitude came later than the apt- suite of commands and has some usability features not present in the latter, but I have yet to come across a case where you have to use one over the other.

The Wikipedia entry for aptitude states that it started out as a front-end to the apt- suite:

aptitude is a front-end to the Advanced Packaging Tool (APT). It displays a list of software packages and allows the user to interactively pick packages to install or remove. [...] Even though aptitude is a single executable, it provides CLI functionality similar to that of apt- family of tools (apt-get, apt-cache, apt-listchanges, etc). Aptitude also emulates most apt-get command line options, allowing it to act as a drop-in replacement for some of the apt-get usages.

share|improve this answer

Long-time Debian users have told me elsewhere that aptitude has it's own database that it maintains alongside the one that apt keeps. This means that using both interchangabley will result in some confusing things happening sometimes, particularly in aptitude when it seems to have a slightly stale copy of the package state. I have seen this happen: it results in things like packages you mysteriously can't remove or can't install.

The GUI program synaptic doesn't have this problem because it relies entirely on the apt database.

share|improve this answer

Aptitude and apt-get serve the exact same purpose for Ubuntu Dapper and beyond. Prior to that, apt-get might not auto-remove things as it should.

Source: http://www.psychocats.net/ubuntu/aptitude

share|improve this answer

One of the minor differences is that if you have packages marked for 'auto removal' that while a simple apt-get install will list them, an aptitude install will go ahead and remove them as part of the package install.

Not a big deal unless you install packages with 'build-dep', starting in 8.10 all build-dep installed packages are marked as auto installed (will be added to auto remove in apt-get and removed in aptitude.

(if you plan on building and using 'build-dep' then this prevents the auto marking if you wish to keep (and or prevent a large auto remove list in apt-get Ex. mplayer sudo apt-get build-dep mplayer -o APT::Get::Build-Dep-Automatic=false

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.