134

What are the differences between apt-get, aptitude, and synaptic, and which one is the recommended choice for normal day-to-day package management?

This is a basic question, but I think it'd be good information to have on the site, and besides I am relatively new to Ubuntu so I could use an expert explanation.

TheWanderer
  • 19,395
  • 12
  • 50
  • 65
David Z
  • 10,301

7 Answers7

114

Probably the most popular package managers are apt-get, aptitude, synaptic, and Software Center. There are others (Linux Mint has its own, and there are some designed for KDE), but these are the ones you'll run into most often.

apt-get is a simple command-line tool. It's handy if you know the exact package name of what you want to install and don't want to spend time clicking through a GUI to get it.

aptitude is very similar to apt-get, and I've heard that it deals better with crazy dependency situations. Which one is really better is debatable.

synaptic is a low-level GUI. This is a good choice if you are a fairly advanced user but are not comfortable with command-line utilities.

Software Center is a very high-level, new-user-friendly GUI. Software is nicely categorized so that, if you're not exactly sure what app you want, you can find what you need quickly. The Software Center also stands out in that it is the only package manager in this list that allows you to purchase commercial applications.

dpkg is a lesser-used, low-level package manager standard for most Debian-based systems. In reality, apt-get, aptitude, synaptic, and the Ubuntu Software Center are all just front-ends to either dpkg or apt, which is in itself a front-end to dpkg.

In answer to your question, "which one is the recommended choice for normal day-to-day package management", I would say that Software Center is recommended for most uses. But as you gain more experience, you will find some of the features of lower-level package managers useful.

fouric
  • 4,588
crenshaw-dev
  • 31,762
  • I have to wonder what the point is of Synaptic at this point. People who want libs use the command line, and people that want programs use Software Center? – mlissner Aug 03 '10 at 20:33
  • To be honest, I rarely use Synaptic any more, and at the moment I can't think of any particular reason I would use Synaptic over one of the other tools (though I do from time to time). Good question. – crenshaw-dev Aug 03 '10 at 21:39
  • 11
    aptitude vs apt-get is not debatable, aptitude is an improvement over apt-get, and perfectly compatible with it. – Mircea Chirea Aug 04 '10 at 21:20
  • 1
    I don't have the knowledge to debate it, but I've seen others debate it. So to the best of my knowledge it's debatable. As for compatibility, I've heard that it's best not to use both. But again, I don't know. I'll leave that for another question. :-) – crenshaw-dev Aug 05 '10 at 02:26
  • Somehow this never occurred to me before, but I actually do use KDE (Kubuntu) primarily, so it'd be a nice bonus to have similar descriptions of the KDE package managers edited in. Not that this answer isn't great as is ;-) – David Z Aug 08 '10 at 22:42
  • I've actually used Ubuntu for three years and never touched Kubuntu. So I don't know enough about her package managers to compare them. Perhaps you could write up a comparison and propose a new answer. (Hey, who ever said you can't have two good answers?) :-) – crenshaw-dev Aug 09 '10 at 13:50
  • @mac: completely missed your comment until now, but that's a good idea. I'll get on that. – David Z Aug 16 '10 at 04:21
  • Done ;-) If you'd like to edit the information on KDE package managers into your answer, I'll delete mine. – David Z Aug 23 '10 at 21:31
  • That's all right, I'll leave it in your answer. You deserve a few rep points for your effort. :-) Thanks! – crenshaw-dev Aug 24 '10 at 11:32
  • It isn't really Ubuntu related but Mint 9 has 'Software Manager' which is the equivalent to Ubuntu's 'Software Center'. Although it doesn't support application sharing, it does add 5 star ratings and reviews to make sorting the wheat from the chaff of software packages a lot easier. For a comparison see this http://www.linuxnov.com/ubuntu-10-10-alpha-2-software-center-vs-linux-mint-9-software-manager/ – Evan Plaice Sep 09 '10 at 23:23
  • 3
    aptitude allows advanced package management features such as package holding which apt-get lacks. – scottl Oct 18 '10 at 09:59
18

The Debian FAQ has a pretty good explanation of the different package managers. (dpkg, apt-get, aptitude, tasksel, synaptic)

lfaraone
  • 4,697
14

As an addition to mac9416's excellent answer, Kubuntu offers the same command-line tools as Ubuntu, namely dpkg, apt-get, and aptitude. There are also two graphical package managers:

Adept is a straightforward GUI for apt-get, which lets you edit the source lists, browse packages by category or by name, see their status, and install/uninstall them.

KPackageKit is a simple GUI for PackageKit, which is a newer, cross-distribution package management system that uses apt-get behind the scenes. It lets you search for programs by various criteria, install and uninstall programs, make routine upgrades, and edit the source lists.

David Z
  • 10,301
6

I personally prefer apt-get because it's a command-line program. And the syntax for installing packages is very simple:

sudo apt-get install packagename

I use apt-get on a day to day basis for installing and removing packages.

Synaptic is GUI-based and aptitude is text-based.

Nathan Osman
  • 32,155
  • aptitude can also be used interactively, and for a long time had features most of the other libapt clients lacked.

    sudo aptitude install works just as well as sudo apt-get install. sudo apitude search works just as well as sudo apt-cache search.

    Aptitude is, however, slated for removal in the future.

    – Broam Jul 29 '10 at 01:13
  • @Broam can you provide a source for the claim that Aptitude is slated for removal? Googling around I couldn't find anything about that. – itsadok Aug 05 '10 at 07:22
  • It's slated for removal in default install, like GIMP. – Broam Aug 05 '10 at 14:58
  • 2
    http://www.webupd8.org/2010/06/aptitude-removed-from-ubuntu-1010.html – Broam Aug 05 '10 at 14:59
5

Basically, they only differ in how low-level they are.

dpkg: not even a proper package manager, apt uses it

apt-get: command-line, only if you know the package name

aptitude: text-based, but user friendly

synaptic: equivalent of aptitude in GUI

Software Center: for everyday users

BTW, these are all front-ends of apt (except dpkg), which is the only package manager on Ubuntu.

Eric Carvalho
  • 54,385
1

One key difference between aptitude and apt-get which has escaped notice above is that aptitude, unlike apt-get, will offer you different options in case there is a dependency clash. apt-get will simply fail. aptitude is much more flexible and versatile for that reason. Having never used a GUI package manager, I don't know how Synaptic and others handle such situations.

Eliah Kagan
  • 117,780
1

One other tool that has hardly received mention is tasksel. It's used for selecting specific tasks, mark them for installation, and then installing them (possibly using aptitude -- not sure).

Run tasksel --list-tasks to have a look at what tasks are available.

tshepang
  • 1,967