38

What is difference of apt-get and aptitude? Does both of them use same repositories?

Which one is better?

0

2 Answers 2

45

aptitude is supposed to be a user level program whereas apt-get is supposed to be used by higher level programs. It just turns out apt-get is easy to use so people just use it instead of the higher level managers like aptitude and synaptic.

aptitude is more user-friendly because it adds a layer of abstraction away from apt-get, apt-cache etc..; apt-get is more user-friendly than dpkg for the same reason. It's really down to the user's knowledge and what works best for them. aptitude and apt-get use the same repositories. Let it be clear that aptitude does not itself run apt-get apt-cache etc.. I merely mean to point out that aptitude is a higher level package manager.

The levels of abstraction:

  • aptitude - High level of abstraction
  • apt-get, apt-cache, etc.
  • dpkg - Low level of abstraction
5
  • 14
    Also worth noting that apt-get often falls on its face for simple operations, and it has no ability to handle dependency mismatches or broken packages (although it claims that broken packages can be fixed with apt-get install -f, I've literally never seen that work in my entire life). For some reason, I use apt-get by default, but when it encounters problems, I usually end up resolving them with aptitude, which never seems to encounter apt-get's numerous problems.
    – weberc2
    Apr 17, 2014 at 13:35
  • 3
    @weberc2, indeed thats true. I spent hours trying to fix problems with -f flag. Aptitude did it without any problem.
    – majkinetor
    Jun 23, 2014 at 14:07
  • 3
    aptitude are frontend to dpkg, not apt-get.
    – J-16 SDiZ
    Nov 12, 2014 at 2:30
  • 1
    "apt-get is supposed to be used by higher level programs like aptitude." but then "Let it be clear that Aptitude does not itself use apt-get apt-cache etc."? What are you actually trying to say? If it only boils down to the idea that aptitude is "higher level", that's only true in a metaphorical - & subjective - sense. For example, if the idea is that it's "higher level" merely because it has all commands in one binary - well, apt can also do that. So this doesn't tell us anything really. Oct 30, 2015 at 11:15
  • @underscore_d you were correct I have removed that from the answer as to avoid confusion, I wrote this answer a while ago.
    – squareborg
    Nov 8, 2015 at 11:17
14

apt-get and aptitude are both front ends 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.

Source: Superuser.com

Few other links you might like to read.

  1. Aptitude vs. apt-get: Which is the recommended (aka the “right”) tool to use?
  2. Is aptitude still considered superior to apt-get?

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