78 Comments
- fatejudger, on 11/11/2007, -0/+51Apt-get has Super Cow Powers. 'Nuff said.
- encryptz, on 10/10/2007, -2/+21Sorry for the server troubles. I have a small PIII 700 with 192MB RAM in my basement hosting the post. My database just can't keep up. As such, I've turned it into static HTML until the storm blows over. My apologies for any disruption of service. Thanks for the frontpage, however. Cool.
- inactive, on 10/10/2007, -0/+18Sever is crawling. Here is the article....
Being an Ubuntu/Debian user (yes, I use and advocate both), I have fallen in love with the Advanced Packaging Tool, also known as apt. 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.
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:
* apt-get: Installing and removing packages from your system, as well as updating package lists and upgrading the software itself.
* apt-cache: Search for packages in the package list maintained by apt on the local system
* dpkg- Used for various administrative tasks to your system, such as reconfiguring Xorg.
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:
* apt-listbugs: See what bugs are listed on a software package before you install it.
* apt-listchanges: Same thing as apt-listbugs, but for non-bug changes.
* apt-rdepends: Tool for viewing dependency trees on packages.
* deborphan- Look for orphaned dependencies on the system left from removing parent packages.
* debfoster- Helps deborphan identify what package dependencies you no longer need on your system.
* dselect- Curses interface for viewing, selecting and searching for packages on your system.
There’s even more: apt-cdrom, apt-config, apt-extracttemplates, apt-ftparchive, apt-key, apt-mark and apt-sortpkgs.
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’?
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 great writeup on this very phenomenon, by simply installing and removing the package kword. The solution? Aptitude.
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.
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:
* aptitude: Running it with no arguments brings up a beautiful interface to search, navigate, install, update and otherwise administer packages.
* aptitude install: Installing software for your system, installing needed dependencies as well.
* aptitude remove: Removing packages as well as orphaned dependencies.
* aptitude purge: Removing packages and orphaned dependencies as well as any configuration files left behind.
* aptitude search: Search for packages in the local apt package lists.
* aptitude update: Update the local packages lists.
* aptitude upgrade: Upgrade any installed packages that have been updated.
* aptitude clean: Delete any downloaded files necessary for installing the software on your system.
* aptitude dist-upgrade: Upgrade packages, even if it means uninstalling certain packages.
* aptitude show: Show details about a package name.
* aptitude autoclean: Delete only out-of-date packages, but keep current ones.
* aptitude hold: Fix a package at it’s current version, and don’t update it
Are we starting to see a pattern here? One command with different readable 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.
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.
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.
Thanks to GarfieldTech for the inspiration of this post.
Lean aptitude. Use aptitude. - schestowitz, on 10/10/2007, -3/+20Most people just use the front ends, such as Synaptic. Adding yum to this comparison might be interesting.
- TheJeffer, on 10/10/2007, -0/+14sudo apt-get mirror
- bruenig, on 10/10/2007, -7/+20apt-get autoremove will remove a package's dependencies in fact the link that this guy posts to psychocats tells you that to be the case and that the dependency nonsense is wrong. Also on the subject of dependency removal, because aptitude remove does it automatically, you are given no option which can leave you in meta-package hell such as this http://pastebin.ca/653424 . The rest of the blog goes on about names but of the functions that he lists with the exception of hold, all you would need to know is "apt-get" and "apt-cache." So using aptitude saves you from learning one more name apparently while at the same time opening you up to meta-package hell.
Granted meta-package hell really isn't aptitude's fault, it is a flaw in apt, its inability to group packages, but still because that problem exists, you have to work around it. - cstrippie, on 10/10/2007, -9/+21"Is Aptitude superior?"
Yes. - martalli, on 10/10/2007, -0/+11lol. Not only is Automatix2 not recommended or supported by ubuntu (nor debian, most likely), but it is certainly not an aptitude/apt-get replacement. I believe if you watch what is transpiring with automatix2, you will see that it is calling apt-get....
- AhronZombi, on 10/10/2007, -1/+10nope. aptitude has always liked to randomly auto remove tons of packages i use w/o me requesting it. id say if you want the best linux package manager your should use pacman, its better than any ive tried, just needs more developed graphical front ends
- enginbeering, on 10/10/2007, -1/+9Dugg for the static HTML page he put up to handle the digg load.
Take notes people. - k8tek, on 10/10/2007, -1/+9I like Ms. Pac-Man, that bow was hot!
- capecodcarl, on 10/10/2007, -1/+9When upgrading my machine from Debian Sarge to Debian Etch I followed the release notes on upgrading religiously and stuck with aptitude until I got to a point of doing the aptitude dist-upgrade. At that point, aptitude just sat there thinking and couldn't figure out how to satisfy all the dependencies, nor let me proceed with trying to install various packages which I, as a human sysadmin, felt would satisfy the dependencies to get me past that point and finish the dist-upgrade. I eventually gave up and switched to using apt-get to install the packages I wanted to upgrade and a couple of apt-get upgrades later the system was at a point where aptitude was able to figure out what the hell to do again and finish its dist-upgrade.
So, my point is, each tool is useful and if you get stuck in dependency hell with aptitude, give apt-get a try before reinstalling from scratch. All the solutions aptitude were coming up with removed a massive amount of my packages including mythtv which I didn't want to lose. apt-get was smart enough to deal with upgrading mythtv and its dependencies and proceeding from there without screwing up my system. - logicbus, on 10/10/2007, -1/+9Nice job. Someone should write a WordPress plugin to do that.
- spectre_25gt, on 10/10/2007, -0/+8E: Invalid operation mirror
- sexybobo, on 10/10/2007, -0/+7Why do people still use Automatix it has been know to break a lot of peoples os and every thing you can do in Automatix can be done in a package manager if you know which files you want to install. except dvd support but how hard is it to find and install libdvdcss2
- Muncher, on 10/10/2007, -0/+7If you were really an "ultra-geek" you'd be talking about portage instead of yum. And your second sentence would be redundant.
- airmind, on 10/10/2007, -1/+7I'm glad noone has it.
Apt-get is better. - tech42er, on 10/10/2007, -0/+6You're right. But it always used to be that aptitude was to be used due to its handling of dependencies, hwich was better than the old apt-get (when there was no "autoremove" option). Now, however, apt-get is preferred because of the autoremove function and because aptitude can be a bit overzealous when removing dependencies.
- KahNeth, on 10/10/2007, -0/+6Yes, he was suggesting comparing the use of yum to the use of apt-get. Most people will never know that they are dealing with rpm or deb based package management, so to then such a comparison would make perfect sense.
- ruest, on 10/10/2007, -0/+6apt-get install wp-cache
- martalli, on 10/10/2007, -1/+6As an end user, I have had no difference in my experience using aptitude vs. apt-get, except for one usability issue. I can type "sudo apti[tab]" and get completion faster than "sudo apt-g[tab]". I can't claim that it really matters, but in this "angels on the head of a pin" discussion, it might be the only salient difference.
Since apt-get remains the mainstay and standard. Why cannot apt-get incorporate whatever is thought to be most important for this cli dpkg interface? - michi2, on 10/10/2007, -1/+6aptitude -vvvvv moo
aptitude -vvvvvv moo - inactive, on 10/10/2007, -2/+7Isn't Yum RPM based?
- zachninme, on 10/10/2007, -1/+6Type just "aptitude" and you get a front end.
- bruenig, on 10/10/2007, -2/+6Are graphical front ends really necessary for package management. I mean how hard is pacman -S package.
- raseel, on 10/10/2007, -0/+4Great article. I was unaware of some of the features of aptitude. I'm gonna give aptitiude a try.
- tkoopa, on 10/10/2007, -1/+5or in true lazy style, you could add alias apt="sudo aptitude" to your .bashrc and so you can type "apt install miro" for example
- uzytkownik, on 10/10/2007, -0/+4Use either portage(or any other source system) or not build from source. Building from source is very hard to maintain (update/remove) and it may possibly create a huge mess in system.
- Meep3D, on 10/10/2007, -0/+4Maybe, just maybe, some people can use the terminal with no problems what-so-ever, yet would prefer to use a GUI?
- xspinkickx, on 10/10/2007, -0/+4I used aptitude however I found that sometimes it removed too much, and since apt-get has autoremove there is no real point. I still use aptitude to search I find its search better than apt-get. Also people do not mix and match with apt-get and aptitude try to stick with one and then use the other if you get into a dependency mess, which can be difficult to do with debian.
- fractured, on 10/10/2007, -5/+9Pacman beats all.
- tech42er, on 10/10/2007, -0/+4They're good for newbies who are terrified of the terminal. We get a lot of those on Ubuntu, which is not necessarily a bad thing. There's enough GUI to let them learn the terminal whenever they want.
- xspinkickx, on 10/10/2007, -0/+3sorry that would be apt-cache
- bruenig, on 10/10/2007, -1/+4Summary - aptitude is only one name as opposed to having to strain and learn both "apt-get" and "apt-cache". Aptitude is better for dependencies (this one is false though). /summary
- inactive, on 10/10/2007, -0/+3i think that most people that would read an article about Apt understand the whole case-sensitive command thing by now.... A bit harsh for a "BURIED", no?
- dark_ryan, on 10/10/2007, -0/+3Please Enter Password:
- jonesin, on 10/10/2007, -1/+3I'd always wanted a good comparison between the current apt-get and aptitude. Can somebody post the article here, it's down.
- muep, on 10/10/2007, -1/+3Using Gentoo != ultra-geek.
- tech42er, on 10/10/2007, -0/+2Well, you can search with aptitude and install with apt-get and remove with apt-get autoremove right (as I assume you do). Just don't install with aptitude and remove with apt-get or vice versa.
- inactive, on 10/10/2007, -0/+2Using Gentoo = Lifeless.
- thtroyer, on 10/10/2007, -1/+3Umm... You're joking, right?
- SuperCow1127, on 10/10/2007, -4/+6I approve of this message.
- Azr3n, on 10/10/2007, -0/+2http://www.duggmirror.com
- zhulien, on 10/10/2007, -0/+2the problem with apt-get which makes it practically USELESS is that it's all based around the idea that when you get a later version of a program, you no longer want to use the older version - whoever designed it with that in mind?
- inactive, on 10/10/2007, -0/+2apt-get does have one clear advantage however:
$ aptitude --help | tail -n1
This aptitude does not have Super Cow Powers.
$ apt-get --help | tail -n1
This APT has Super Cow Powers.
$ apt-get moo - felizdkat, on 10/10/2007, -0/+2More Information about the different between aptitude & apt-get.
http://www.psychocats.net/ubuntu/aptitude - Dylan47, on 10/10/2007, -4/+6This aptitude does not have Super Cow Powers
- antdude, on 10/10/2007, -0/+2And together, thjey made Baby Pac-Man (pinball + arcade) and Jr. Pac-Man!
- Azrael666, on 10/10/2007, -1/+2Wajig owns them all. It has much more options than aptitude.
- Aninhumer, on 10/10/2007, -1/+2Also, "pacman -S package" is slightly less intuitive than "apt-get install package", sure it's no trouble to people used to the command line, but new users would prefer the latter.
-
Show 51 - 77 of 77 discussions



What is Digg?
Browsing Digg on your phone just got easier with our enhancements to the