Jump to content
xisto Community
Sign in to follow this  
dserban

Aptitude Vs. Apt-get

Recommended Posts

This is a very well-written article explaining all the ways in which aptitude is superior to the built-in Debian / Ubuntu package management tools. As a courtesy to the author (he's been having severe bandwidth problems due to the huge popularity of his article, he has a small PIII 700 with 192MB RAM in his basement hosting the post - his database just can't keep up), I am posting here a copy of the article, as well as the direct link at the end of this posting, for completeness.


<p>I have been DDoSed by Digg. Unfortunately, my little server can't take the load, so I'm serving a static HTML page until the storm blows over. Please visit back later. Thanks. Feel free to grab my feed at <a href='http://forums.xisto.com/no_longer_exists/; <div class="entry"> <p>Being an Ubuntu/Debian user (yes, I use and advocate both), I have fallen in love with the Advanced Packaging Tool, also known as <i>apt</i>. Before Ubuntu, I played in the world of RPM hell, with distros such as Red Hat itself, Mandrake (as it was called back then), and even SuSE. I would find some piece of software, try to install it, only to find that it would choke, saying that it relied on some certain dependencies. I would install the dependencies, only to find conflicting versions with newer software. Hell indeed. So when I discovered the Debian way of installing software, I wondered why no one had mentioned it to me before. It was heaven. This is the way to software, I thought.</p> <p>So, as any new user to the world of apt learns, apt-get is the way to install software in your system. After working on a Debian-based system that uses apt, such as Ubuntu, you also learn the various tools:</p> <ul> <li>apt-get: Installing and removing packages from your system, as well as updating package lists and upgrading the software itself.</li> <li>apt-cache: Search for packages in the package list maintained by apt on the local system</li> <li>dpkg- Used for various administrative tasks to your system, such as reconfiguring Xorg.</li> </ul> <p>Those are probably the first few tools that you learn while on a Debian-based distro, if you plan on getting down and dirty at any length. But the buck doesnât stop there. You need to memorize, and learn other tools, if you are to further administrate your system. These include:</p> <ul> <li>apt-listbugs: See what bugs are listed on a software package before you install it.</li> <li>apt-listchanges: Same thing as apt-listbugs, but for non-bug changes.</li> <li>apt-rdepends: Tool for viewing dependency trees on packages.</li> <li>deborphan- Look for orphaned dependencies on the system left from removing parent packages.</li> <li>debfoster- Helps deborphan identify what package dependencies you no longer need on your system.</li> <li>dselect- Curses interface for viewing, selecting and searching for packages on your system.</li> </ul> <p>Thereâs even more: apt-cdrom, apt-config, apt-extracttemplates, apt-ftparchive, apt-key, apt-mark and apt-sortpkgs.</p> <p>If any of you have noticed, that is 16 different tools that you need to become familiar with, if you are to start learning about your Debian-based distro. I donât know about you, but doesnât that seem a bit bass-ackwards? I mean, when Iâm using OpenSSH, for example, other than scp, all of the functionality of OpenSSH is filed under one tool: ssh. So, wouldnât you think that all the functionality of apt would be under one tool, namely just âaptâ?</p> <p>Further more, apt-get has a big problem that hasnât really been addressed until only just recently. The problem is in removing packages. You see, apt-get does a great job of indentifying what dependencies need to be installed when you want a certain package, but it fails miserably when you want to remove that package. If dependencies were required, âapt-get removeâ will remove your packages, but leave orphaned dependencies on your system. Psychocats.net has a <a href="http://psychocats.net/ubuntu/aptitude/ writeup</a> on this very phenomenon, by simply installing and removing the package kword. The solution? Aptitude.</p> <p>Now, before I continue, I want to say that yes, I am aware of âapt-get autoremoveâ finally being able to handle orphaned dependencies. This is a step in the right direction, for sure. However, apt-get, with its many other tools, is an okay way of doing things, if you like to learn 16 different tools. Aptitude, as I will show you, is one tool for them all.</p> <p>Aptitude is the superior way to install, remove, upgrade, and otherwise administer packages on you system with apt. For one, since itâs inception, aptitude has been solving orphaned dependencies. Second, it has a curses interface that blows the doors off of dselect. Finally, and most importantly, it takes advantage of one tool, doing many many functions. Letâs take a look:</p> <ul> <li>aptitude: Running it with no arguments brings up a beautiful interface to search, navigate, install, update and otherwise administer packages.</li> <li>aptitude install: Installing software for your system, installing needed dependencies as well.</li> <li>aptitude remove: Removing packages as well as orphaned dependencies.</li> <li>aptitude purge: Removing packages and orphaned dependencies as well as any configuration files left behind.</li> <li>aptitude search: Search for packages in the local apt package lists.</li> <li>aptitude update: Update the local packages lists.</li> <li>aptitude upgrade: Upgrade any installed packages that have been updated.</li> <li>aptitude clean: Delete any downloaded files necessary for installing the software on your system.</li> <li>aptitude dist-upgrade: Upgrade packages, even if it means uninstalling certain packages.</li> <li>aptitude show: Show details about a package name.</li> <li>aptitude autoclean: Delete only out-of-date packages, but keep current ones.</li> <li>aptitude hold: Fix a package at itâs current version, and donât update it</li> </ul> <p>Are we starting to see a pattern here? One command with different <i>readable</i> options (no unnecessary flags). And thatâs just the tip of the ice berg. It gets better. For example, when searching for a package using aptitude, the results are sorted alphabetically (gee, imagine that) and justified in column width format. Heck, it will even tell you which one you have installed on your system already, instead of haphazardly listing the packages in some random, unreadable format, like apt-cache.</p> <p>Iâve already mentioned it, but aptitude run with no options will pull up a curses application for you to navigate your apt system. If any of you have used it, you know that it is far superior to dselect- talk about a shoddy application. Aptitude makes searching for packages, updating them, removing them, getting details and other necessary tools, easy. Spend 20 minutes inside the console, and you begin to feel like this is an application done right. Spend 20 minutes in dselect, and youâll begin to get massive headaches, and feel lost inside Panâs Labyrinth.</p> <p>Aptitude is just superior to apt-get in every way, shape, and form. Better dependency handling. Better curses application. Better options. ONE tool. Better stdout formatting. The list goes on and on. I see constantly, on forums, IRC and email, the use of apt-get. We need to better educate our brethren and sisters about the proper use of tools, and show them the enlightened way of aptitude. Iâve been using aptitude since I first learned about it, ad will continue to do so the remainder of my Debian/Ubuntu days.</p> <p>Thanks to <a href="http://www.garfieldtech.com/blog/your-debian-aptitude; for the inspiration of this post.</p> <p>Lean aptitude. Use aptitude.</p> </div>


Link: https://pthree.org/2007/08/12/aptitude-vs-apt-get/ Edit: I just realized I don't know how to make it render the HTML inside the quote tags, and the BB code help doesn't help. Ideas anyone?


Edited by OpaQue (see edit history)

Share this post


Link to post
Share on other sites

Is this a surprise though? I mean, the entire purpose of aptitude is to be a new more user friendly version of apt-get. If it didn't handle the issues listed in this article no one would even know about it since it would jsut be a knock off of an already strong apt-get (regardless of the things whined about aboce :P )Personally I use whichever comes into my mind first when I have to do something, although it is a very well thought out article but he should have tried to keep his tone a little less biased sounding, I get annoyed when people are gushing over one thing vs another haha, makes me want to care about the hard facts they present less.

Share this post


Link to post
Share on other sites

Generally speaking I just use apt-get on my Kubuntu system...it's just faster than opening up a GUI package manager...when I know what I want to install. If I don't know the package name I tend to use Adept Package Manager to act as the apt-get frontend, though usually I just fire it up to find the package name and then manually pop it into apt-get...I don't like the GUI hiding output from dpkg-(re)configure from me when I install packages.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.