apt-get install debian-wizard

Insider infos, master your Debian/Ubuntu distribution

  • About
    • About this blog
    • About me
    • My free software history
  • Support my work
  • Get the newsletter
  • More stuff
    • Support Debian Contributors
    • Other sites
      • My company
      • French Blog about Free Software
      • Personal Website (French)
  • Mastering Debian
  • Contributing 101
  • Packaging Tutorials
You are here: Home / Documentation / apt-get, aptitude, … pick the right Debian package manager for you

apt-get, aptitude, … pick the right Debian package manager for you

June 20, 2011 by Raphaël Hertzog

This is a frequently asked question: “What package manager shall I use?”. And my answer is “the one that suits your needs”. In my case, I even use different package managers depending on what I’m trying to do.

APT vs dpkg, which one is the package manager?

In the Debian world, we’re usually thinking of APT-based software when we’re referring to a “package manager”. But in truth, the real package manager is dpkg. It’s the low-level tool that takes a .deb file and extracts its content on the disk, or that takes the name of a package to remove the associated files, etc.

APT is better known because it’s the part of the packaging infrastructure that matters to the user. APT makes collection of software available to the user and does the dirty work of downloading all the required packages and installing them by calling dpkg in the correct order to respect the dependencies.

But APT is not a simple program, it’s a library and several different APT frontends have been developed on top of that library. The most widely known is apt-get since it’s the oldest one, and it’s provided by APT itself.

Graphical APT front-ends

update-manager is a simple frontend useful to install security updates and other trivial daily upgrades (if you’re using testing or sid). It’s the one that you get when you click in the desktop notification that tells you that updates are available. In cases, where the upgrade is too complicated for update-manager, it will suggest to run synaptic which is full featured package manager. You can browse the list on installed/available packages in numerous ways, you can mark packages for installation/upgrade/removal/purge and then run in one go all the recorded actions.

software-center aims to be an easy to use application installer, it will hide most of the packaging details and will only present installed/available applications (as defined by a .desktop file). It’s very user friendly and has been developed by Ubuntu.

Of the graphical front-ends, I use mainly synaptic and only when I’m reviewing what I have installed to trim the system down.

Console-based GUI APT front-ends

In this category, I’ll cite only aptitude. Run without parameter, it will start a powerful console-based GUI. Much like synaptic, you can have multiple views of the installed/available packages and mark packages for installation/upgrade/removal/purge before executing everything at once.

Command-line based package managers and APT front-ends

This is where the well known apt-get fits, but there are several other alternatives: aptitude, cupt, wajig. Wajig and cupt are special cases as they don’t use libapt: the former wraps several tools including apt-get, and the latter is a (partial) APT reimplementation (versions 1.x were in Perl, 2.x are now is C++).

You’re welcome to try them out and find out which one you prefer, but I have never felt the need to use something else than apt-get and aptitude.

apt-get or aptitude?

First I want to make it clear that you can use both and mix them without problems. It used to be annoying when apt-get did not track which packages were automatically installed while aptitude did, but now that both packages share this list, there’s no reason to avoid switching back and forth.

I would recommend apt-get for the big upgrades (i.e. dist-upgrade from one stable to the next) because it will always find quickly a relatively good solution while aptitude can find several convoluted solutions (or none) and it’s difficult to decide which one should be used.

On the opposite for regular upgrades in unstable (or testing), I would recommend “aptitude safe-upgrade“. It does a better job than apt-get at keeping on hold packages which are temporarily broken due to some not yet finished changes while still installing new packages when required. With aptitude it’s also possible to tweak dynamically the suggested operations while apt-get doesn’t allow this. And aptitude’s command line is probably more consistent: with apt-get you have to switch between apt-get and apt-cache depending on the operation that you want to do, aptitude on the other hand does everything by itself.

Take some time to read their respective documentation and to try them.

Click here to subscribe to my free newsletter and get my monthly analysis on what’s going on in Debian and Ubuntu. Or just follow along via the RSS feed, Identi.ca, Twitter or Facebook.

Filed Under: Documentation, User Documentation Tagged With: APT, aptitude, cupt, Debian, dpkg, package manager, software-center, synaptic, Ubuntu, wajig

Comments

  1. Boris Dušek says

    June 20, 2011 at 10:06 am

    The link to software-center is missing the dash in the package name (softwarecenter instead of software-center).

    • Raphaël Hertzog says

      June 20, 2011 at 10:11 am

      Thanks, fixed.

  2. Eugene V. Lyubimkin says

    June 20, 2011 at 10:14 am

    Raphaël, Cupt is not APT front-end.

    • Raphaël Hertzog says

      June 20, 2011 at 10:23 am

      Sorry for the mistake, I fixed the article.

  3. cbx says

    June 20, 2011 at 11:01 am

    Just a feedback from my family : my daughter, a teenager using linux as her personal desktop OS, just loves Software Center : she looks for software she needs easily through this interface and can install what she found very easilly too.

    Real life example of Software Center usage 🙂

  4. Julian Andres Klode says

    June 20, 2011 at 11:37 am

    With cupt, you can specify on the command-line which packages should remain installed during the upgrade making it very useful if you have some packages you absolutely want to keep (such as one big meta package)

  5. jidanni says

    June 21, 2011 at 5:30 am

    I use this combo every day
    apt-get update && aptitude full-upgrade
    As you can see, I use aptitude, but always its CLI and never its GUI, which older user me finds confusing.

    • jidanni says

      June 22, 2011 at 7:09 pm

      I mix the two packages due to bug #563887: aptitude: update doesn’t alert user of the errors that apt-get update does. Else I would use pure aptitude.

  6. Casper says

    June 22, 2011 at 3:34 pm

    “but now that both packages share this list”

    What does it mean? Since squeeze? Can mixing both aptitude and apt-get in lenny and earlier cause problems? Thanks in advance for clarification.

    • Raphaël Hertzog says

      June 22, 2011 at 4:38 pm

      The feature is in APT since 0.7.0. Lenny and Squeeze are thus OK, earlier versions are not (i.e. installing packages with apt-get will not add the “automatically installed” flag to the dependencies that were automatically installed).

  7. Selim Erdoğan says

    June 24, 2011 at 11:47 am

    I still use dselect. 🙂

  8. Mathieu says

    January 30, 2012 at 3:57 am

    Simple as ABC: Linux people want casual users to go to linux and beat the crap outta Apple and Microsoft ? Casual users need Software Center and GUI. Time to stop being Linux/MacFags Compu-Hipster with code lines and everything… If not: PLEAAAAAAAAAAAASE, LEAVE CASUAL USERS TO THEIR F******** WINDOWS AND APPLE DEVICES. Casual users NEEDS GUI because they (we, I) have NOT followed any computing course EVER. They (we, I) like their TOOLS SIMPLE, as a TOOL IS SUPPOSED TO BE. Thank you, Linux world.

Get the Debian Handbook

Available as paperback and as ebook.
Book cover

Email newsletter

Get updates and exclusive content by email, join the Debian Supporters Guild:

Follow me

  • Email
  • Facebook
  • GitHub
  • RSS
  • Twitter

Discover my French books

Planets

  • Planet Debian

Archives

I write software, books and documentation. I'm a Debian developer since 1998 and run my own company. I want to share my passion and knowledge of the Debian ecosystem. Read More…

Tags

3.0 (quilt) Activity summary APT aptitude Blog Book Cleanup conffile Contributing CUT d-i Debconf Debian Debian France Debian Handbook Debian Live Distro Tracker dpkg dpkg-source Flattr Flattr FOSS Freexian Funding Git GNOME GSOC HOWTO Interview LTS Me Multiarch nautilus-dropbox News Packaging pkg-security Programming PTS publican python-django Reference release rolling synaptic Ubuntu WordPress

Recent Posts

  • Freexian is looking to expand its team with more Debian contributors
  • Freexian’s report about Debian Long Term Support, July 2022
  • Freexian’s report about Debian Long Term Support, June 2022
  • Freexian’s report about Debian Long Term Support, May 2022
  • Freexian’s report about Debian Long Term Support, April 2022

Copyright © 2005-2021 Raphaël Hertzog