I know that both apt-get and aptitude are command line package management interfaces on Debian derived Linux, with different options, but I'm still somewhat confused. Under the hood, aren't they using the same APT system?

Why does Debian maintain these parallel tools? (Bonus question: what on earth is wajig?)

  • I know its not the correct answerer for you question but why cant you try synaptic? its very user frindly and does download and install dependencies automatically. Is gnome is not present on your system?
    – Hemant
    Commented Aug 11, 2010 at 7:12
  • I'm biased, but I think this question on the Ubuntu SE site might be relevant.
    – David Z
    Commented Aug 19, 2010 at 7:38
  • 5
    duplicate: unix.stackexchange.com/questions/244/apt-get-or-aptitude .
    – Wim Coenen
    Commented Aug 19, 2010 at 8:13
  • @Wim because of the wajig portion of this question I decided to merge 244 into this question instead of the other way around Commented Sep 5, 2010 at 20:44
  • 2
    Its worth noting that aptitude is slated for removal from the default install on the next version of Ubuntu (although you could always install it using apt-get afterwards)
    – Rob Cowell
    Commented Feb 16, 2011 at 12:47

10 Answers 10


The most obvious difference is that aptitude provides a terminal menu interface (much like Synaptic in a terminal), whereas apt-get does not.

Considering only the command-line interfaces of each, they are quite similar, and for the most part, it really doesn't matter which one you use. Recent versions of both will track which packages were manually installed, and which were installed as dependencies (and therefore eligible for automatic removal). In fact, I believe that even more recently, the two tools were updated to actually share the same database of manually vs automatically installed packages, so cases where you install something with apt-get and then aptitude wants to uninstall it are mostly a thing of the past.

There are a few minor differences:

  • aptitude will automatically remove eligible packages, whereas apt-get requires a separate command to do so
  • The commands for upgrade vs. dist-upgrade have been renamed in aptitude to the probably more accurate names safe-upgrade and full-upgrade, respectively.
  • aptitude actually performs the functions of not just apt-get, but also some of its companion tools, such as apt-cache and apt-mark.
  • aptitude has a slightly different query syntax for searching (compared to apt-cache)
  • aptitude has the why and why-not commands to tell you which manually installed packages are preventing an action that you might want to take.
  • If the actions (installing, removing, updating packages) that you want to take cause conflicts, aptitude can suggest several potential resolutions. apt-get will just say "I'm sorry Dave, I can't allow you to do that."

There are other small differences, but those are the most important ones that I can think of.

In short, aptitude more properly belongs in the category with Synaptic and other higher-level package manager frontends. It just happens to also have a command-line interface that resembles apt-get.

Bonus Round: What is wajig?

Remember how I mentioned those "companion" tools like apt-cache and apt-mark? Well, there's a bunch of them, and if you use them a lot, you might not remember which ones provide which commands. wajig is one solution to that problem. It is essentially a dispatcher, a wrapper around all of those tools. It also applies sudo when necessary. When you say wajig install foo, wajig says "Ok, install is provided by apt-get and requires admin privileges," and it runs sudo apt-get install foo. When you say wajig search foo, wajig says "Ok, search is provided by apt-cache and does not require admin privileges," and it runs apt-cache search foo. If you use wajig instead of apt-get, apt-mark, apt-cache and others, then you'll never have this problem:

$ apt-get search foo
E: Invalid operation search

If you want to know what wajig is doing behind the scenes, which tools it is using to implement a particular command, it has --simulate and --teaching modes.

Two wajig commands that I often use are wajig listfiles foo and wajig whichpkg /usr/bin/foo.

  • One big issue I had with aptitude is that it takes a long time to get tab completions on package names (eg, aptitude install linux-im tab), while it is very fast for apt-get. There seems to be some caching present in the apt-get family that is lacking for aptitude.
    – levesque
    Commented Sep 11, 2012 at 1:49
  • 14
    aptitude also have the awesome aptitude search that you can use with very powerful search patterns. You have aptitude reinstall. You can also use the ncurses (terminal menu) interface to prepare complex package operations like partial upgrade, remove one package, freeze another one, upgrade this one, that you can then execute in a single operation... Oh, and it has an interactive conflict resolver.
    – Totor
    Commented Mar 21, 2013 at 23:52
  • 4
    @Totor holy cow, using aptitude's ncurses interface to prepare commands just sold me on aptitude once and for all! (after years of thinking aptitude is worth doing, but typing apt-get from muscle memory)
    – Tara
    Commented Oct 16, 2013 at 16:19
  • 2
    ...and aptitude also has aptitude download package-name to get the package .deb file!
    – Totor
    Commented Oct 18, 2013 at 14:44
  • 2
    It's just one thing I have found that isn't in aptitude but are in apt-get, and that is apt-get --compile source package-name. apt-get build-dep package-name exist but I think that aptitude build-dep package-name do a better job.
    – Anders
    Commented Mar 10, 2014 at 14:13

I've often wondered myself. Wikipedia highlights that the main distinguishing feature is that aptitude has a full screen text-mode (curses) interface. The fact that you can use most apt-get command arguments with aptitude itself is just a design decision to make it easier for apt-get users to move to aptitude and vice-versa.

I've never used wajig, but the documentation suggests that it's just a script which knows whether you're passing it a deb file (when it runs dpkg) or an apt package name (when it runs apt-get instead). Could you try it out and see if that is what it does?

Of course, the real difference is:

gaurav@fern:~$ apt-get moo
  / |    ||   
 *  /\---/\ 
    ~~   ~~   
...."Have you mooed today?"...
gaurav@fern:~$ aptitude moo
There are no Easter Eggs in this program.
  • 55
    No! aptitude has more. You forgot to put the endless -v flags to moo. (You can go upto -vvvvvv)
    – Umang
    Commented Aug 19, 2010 at 6:51
  • 12
    Don't forget the all important Super Cow Powers, which apt-get has but aptitude does not. (Try --help on both)
    – derobert
    Commented Aug 20, 2010 at 18:51
  • lmao. that is a fun answer to read, even though @ryan's answer is far more elaborate ;)
    – Michahell
    Commented May 1, 2015 at 23:09

aptitude is the preferred program for package management from console both for package installations and package or system upgrades in Debian.

Here is an overview of the tool and the features it has over apt-get: http://www.debian.org/doc/FAQ/ch-pkgtools.en.html#s-aptitude

So, my advice is to just apt-get install aptitude :)

  • 2
    The release notes say apt-get is now recommended over aptitude for upgrades to squeeze.
    – jrdioko
    Commented Feb 9, 2011 at 19:55
  • 1
    Yes, but only for that. Otherwise they are considered equal but aptitude has a lot of more advanced features, like search and full screen mode, than apt-get.
    – Anders
    Commented Mar 10, 2014 at 14:18
  • For some reason used aptitude to install emacs and without looking it removed gdm! So for the now will be using apt-get but am very curious of aptitude.
    – TomFirth
    Commented Mar 26, 2014 at 8:18

aptitude remembers which packages were explicitly requested and which were only installed due to dependencies. It will automatically uninstall packages which were not explicitly requested when they are no longer needed.

apt-get treats packages requested explicitly and their dependencies the same.

So better use aptitude, this helps to keep your system clean.

  • 4
    This used to be true, but I know my apt-get has an apt-get autoremove command for removing packages installed only as dependencies. I don't know when this feature was added, but one website suggests it might have happened with Debian Lenny (June 2010).
    – Gaurav
    Commented Aug 19, 2010 at 10:55
  • 8
    apt-get autoremove doesn't remove packages installed only as dependencies, it removes orphaned dependencies, which is a subtle difference; it can't tell whether a 'leaf' package was installed with intent or as a dependency so it leaves it, where aptitude would know and remove it.
    – pjz
    Commented Aug 19, 2010 at 15:05
  • I'm sold! There are other nice things about aptitude but this is hands-down a killer feature.
    – iconoclast
    Commented May 10, 2018 at 19:24

Building on @Gaurav's answer, the easter eggs in the two package managers are quite funny!:

siddhartha@siddhartha-dev:~$ apt-get  moo
      / |    ||   
     *  /\---/\ 
        ~~   ~~   
..."Have you mooed today?"...

siddhartha@siddhartha-dev:~$ aptitude  moo
There are no Easter Eggs in this program.
siddhartha@siddhartha-dev:~$ aptitude -v moo
There really are no Easter Eggs in this program.
siddhartha@siddhartha-dev:~$ aptitude -vv moo
Didn't I already tell you that there are no Easter Eggs in this program?
siddhartha@siddhartha-dev:~$ aptitude -vvv moo
Stop it!
siddhartha@siddhartha-dev:~$ aptitude -vvvv moo
Okay, okay, if I give you an Easter Egg, will you go away?
siddhartha@siddhartha-dev:~$ aptitude -vvvvv moo
All right, you win.

                       -------/      \
                      /               \
                     /                |
   -----------------/                  --------\
siddhartha@siddhartha-dev:~$ aptitude -vvvvvv moo
What is it?  It's an elephant being eaten by a snake, of course.
siddhartha@siddhartha-dev:~$ aptitude -vvvvvvv moo
What is it?  It's an elephant being eaten by a snake, of course.
siddhartha@siddhartha-dev:~$ aptitude -vvvvvvvv moo
What is it?  It's an elephant being eaten by a snake, of course.

and so on.


apt-get, as well as the various companion tools, use significantly less memory than respective command-line invocations of aptitude, and are a bit quicker. I was blissfully unaware of this until I tried upgrading the debian install on a wizened old pentium thinkpad with 32MB of ram. It would take an hour or two of swap-thrashing to run apt-get, which completed successfully; aptitude would fail after I think a longer period of time.

This distinction is more or less irrelevant on anything resembling a modern desktop system.


They offer the same basic functionality: install and remove packages from the command-line.

Here's a more detailed comparison, posted on the Ubuntu Stack Exchange website: https://askubuntu.com/questions/1743/is-aptitude-really-better-than-apt-get/1749#1749

  • They are pretty similar, I can switch between them easy enough.
    – invert
    Commented Aug 11, 2010 at 8:48

As mentioned be http://pthree.org/2007/08/12/aptitude-vs-apt-get/, aptitude has a much easier to use command-line interface.

Under the hood, aren't they using the same APT system? Yes.

The underlying system is not just apt, but dpkg. This system is just as dumb as RPM, it can only handle the installation and administration of single packages. It tracks which installed files belong to which package.

apt handles the downloads of repositories, tracking of dependencies, and so on for all individual packages - which it then installs using dpkg. aptitude does the same, with a different interface.


Both apt-get and aptitude rely on the APT library, yes.

See my answer on serverfault.com.

Debian is not a monolithic entity, there are people with different opinions and the aptitude maintainer decided that apt-get had some shortcomings and wanted to build something better with aptitude. He improved the logic to find solutions for complex upgrade scenarios, added a GUI for the console, etc. And there's more than just apt-get and aptitude, see my article apt-get, aptitude, … pick the right package manager for you.


I'm not sure if this still holds but the bleeding edge Debian developer Joey Hess always used to advocate aptitude over apt-get. Of course things to change as software evolves. Apt-get now handles dependencies better than it used to. From http://lists.debian.org/debian-user/2004/04/msg03138.html

Date: Tue, 20 Apr 2004 22:27:12 -0400 From: Joey Hess

Nine reasons why you should be using aptitude instead of apt-get or dselect.

  1. aptitude can look just like apt-get

    If you run 'aptitude update' or 'aptitude upgrade' or 'aptitude install', it looks and works just like apt-get, with a few enhancements. So there is no learning curve.

    (If you're a dselect user, learning curve is obviously not one of your problems.)

  2. aptitude tracks automatically installed packages

    Stop worrying about pruning unused libraries and support packages from your system. If you use aptitude to install everything, it will keep track of what packages are pulled in by dependencies alone, and remove those packages when they are no longer needed.

  3. aptitude sanely handles recommends

    A long-standing failure of apt-get has been its lack of support for the Recommends relationship. Which is a problem because many packages in Debian rely on Recommends to pull in software that the average user generally uses with the package. This is a not uncommon cause of trouble, even though apt-get recently became able to at least mention recommended packages, it's easy to miss its warnings.

    Aptitude supports Recommends by default, and can be confgigured to support Suggests too. It even supports installing recommended packages when used in command-line mode.

  4. use aptitude as a normal user and avoid hosing your system

    Maybe you didn't know that you can run aptitude in gui mode as a regular user. Make any changes you'd like to try out. If you get into a real mess, you can hit 'q' and exit, your changes will not be saved. (Aptitude also lets you use ctrl-u to undo changes.) Since it's running as a normal user, you cannot hose your system until you tell aptitude to do something, at which point it will prompt you for your root password.

  5. aptitude has a powerful UI and searching capabilities

    Between aptitude's categorical browser and its great support for mutt-style filtering and searching of packages by name, description, maintainer, dependencies, etc, you should be able to find packages faster than ever before using aptitude.

  6. aptitude makes it easy to keep track of obsolete software

    If Debian stops distributing a package, apt will leave it on your system indefinitly, with no warnings, and no upgrades. Aptitude lists such packages in its "Obsolete and Locally Created Packages" section, so you can be informed of the problem and do something about it.

  7. aptitude has an interface to the Debian task system

    Aptitude lets you use Debian's task system as it was designed to be used. You can browse the available tasks, select a task for install, and then dig into it and de-select parts of the task that you don't want. apt-get has no support for tasks, and aptitude is better even than special purpose tools like tasksel.

  8. aptitude supports multiple sources

    If your sources.list is configured to make multiple versions of a package available, aptitude lets you drill down to see the available versions and pick a non-default version to install. If a package breaks in unstable, just roll it back to the version in testing.

  9. aptitude logs its actions

    Aptitude logs package it installs, upgrades, and removes to /varlog/aptitude, which can be useful to work out why things started breaking after yesterday's upgrade, or when you removed a partiticlar package.

-- see shy jo

=================== there is also a newer discussion from 2010 here https://superuser.com/questions/93437/aptitude-vs-apt-get-which-is-the-recommended-aka-the-right-tool-to-use on StackExchange.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .