HOWTO: use aptitude instead of synaptic and why.

This post is an old article I once posted on ubuntu forums – I’m getting it here for my own archival.

What is aptitude?
Aptitude is a package manager for Debian and Debian based systems (similar to say, synaptic).

Why should you use aptitude over synaptic/apt-get?
The million dollar reason: it remembers dependencies downloaded to install a particular package and removes them automatically when you remove that package. Synaptic only gives you the history log, and apt-get not even that.
For example:

I install wmaker using synaptic, it installs libwraster along with it.
I purge wmaker out using synaptic, it leaves libwraster. I have to manually search for it and uninstall.

Now this may not seem a big deal, but imagine if wmaker had 20 dependencies.
On the other hand:

I install wmaker using aptitude, it installs libwraster with it.
I purge wmaker out using aptitude, it figures out libwraster isn’t needed anymore, and gets rid of that too.

Awesome, isn’t it? 🙂
But I held back from using this rather nifty tool because I didn’t want to learn how to use it. Now I can use it, at least to do simple tasks. So I thought I would share that knowledge.

aptitude can run in two modes:

  1. command line mode
    I will not write about this, other than to say the commands stay like apt-get .. which means you get aptitude power with apt-get commands.
    For eg.,
    sudo aptitude install wmaker
    sudo aptitude update
    sudo aptitude upgradeNote: to do a default upgrade, use the commandline above. Pressing U in the gui seems to do a smart upgrade, and that isn’t something I always want.
  2. gui mode
    You start this with: sudo aptitude
    f10 : pulls down the menu
    Note: it seems f10 pulls down the gnome-terminal menu. If you want to use f10, then you may need to turn off the gnome-terminal menu for the session. Alternately, just click on the aptitude menu, the mouse click works.
    q : quit
    u : updates package lists
    / : search for a package (firefox style)
    n : find next
    f : forget new packages, useful if you have a habit of peeking into new packages available after each update.Once you have found your package,
    enter: to see information about that package
    + : mark a package for install or upgrade
    (minus) : mark a package for removal
    _ (underscore): mark a package for purging
    : : cancel any action on the selected packageU: to mark all upgradable packages (for upgrade :))
    Once you have marked your changes,
    g : apply those changes.
    If you are in a screen which says displays package information, and you want to go back to the earlier screen, press f6 or q.

Once you press g, all the changes get listed. You can modify any of the changes, and then press g again to finally apply marked changes. I’ll keep adding to this HOWTO as I learn new things, and if you have any suggestions/tips/corrections please add to this thread .. I’ll update this post.


4 thoughts on “HOWTO: use aptitude instead of synaptic and why.

  1. The Ubuntu distribution simplifies Linux by providing a sensible collection of applications, an easy-to-use package manager, and lots of fine-tuning, which make it possibly the best Linux for desktops and laptops. Readers of both Linux Journal and TUX Magazine confirmed this by voting Ubuntu as the best Linux distribution in each publication’s 2005 Readers Choice Awards. None of that simplification, however, makes Ubuntu any less fun if you’re a hacker or a power user.

  2. Pingback: Aptitude, synaptic, apt « Microwave Biscuit

  3. Pingback: Debian-Basissystem nach und nach erweitern | hilpers

  4. Pingback: Debian Day 6: Getting help and information » Rob Hodgins Writer

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s