Beyond the visually obvious reasons to choose either aptitude or apt-get, there are some functional aspects to each one which may make the obvious far more of a grey area. Aptitude is meant primarily as a user level program, whereas apt-get is meant for use on higher level programs.
Many users will attest to the fact that apt-get is easy to use, opting for it by default instead of using the higher level managers like aptitude and synaptic.
In actual fact, aptitude is more user-friendly. There is a layer of abstraction away from apt-get, apt-cache among others added. It is for this reason that apt-get is more user-friendly than dpkg. While a lot of it comes down to user preference and discernment, because aptitude and apt-get use the same repositories, it cannot be overstated that Aptitude does not use apt-get apt-cache. It simply acts as a higher level package manager. The levels a=of abstraction vary from Aptitude right at the top with a high level as opposed to dpkg’s lower level.
Aptitude can look just like apt-get. If you run ‘aptitude update’ or ‘aptitude upgrade’ or ‘aptitude install’, it looks and works just like apt-get, with a few enhancements. This means there is no learning curve.
2. Aptitude Sanely Handles Recommends
A long-standing failure of apt-get has been its lack of support for the Recommends relationship. This eventually proves problematic because many packages in Debian rely on Recommends to pull in software that the average user generally uses the package. This is a not uncommon cause of trouble, even though apt-get recently became able to at least mention recommended packages, it’s easy to miss its warnings. Aptitude supports Recommends by default and can be configured to support Suggests too. It even supports installing recommended packages when used in command-line mode.
3. Aptitude Tracks Automatically Installed Packages
This means a lot less time spent pruning unused libraries and support packages from your system. If you use aptitude to install everything, it will keep track of what packages are pulled in by dependencies alone, and remove those packages when they are no longer needed.
4. Avoid Hosting Your System
You are able to run Aptitude in GUI mode as a regular user and make any changes you’d like to try out in an almost WYSIWYG manner. Should you find yourself in a challenging paradigm, all you need to do is hit ‘q’ which exits the program with your changes unsaved. You may also use ctrl-u to undo changes. Since it’s running as a normal user, you can not hose your system until you tell aptitude to do something, at which point it will prompt you for your root password. No visual feedback.
Aptitude has powerful searching capabilities. Between Aptitude’s categorical browser and its great support for mutt-style filtering and searching of packages by name, description, maintainer, dependencies, etc, you should be able to find packages faster than ever before using aptitude.
6. Track Obsolete Software
If Debian stops distributing a package, apt will leave it on your system indefinitely, with no warnings, and no upgrades. Aptitude lists such packages in its “Obsolete and Locally Created Packages” section, so you can be informed of the problem and do something about it.
7. Aptitude’s Interface
Aptitude has an interface to the Debian task system which lets you use Debian’s task system as it was designed to be
used. You can browse the available tasks, select a task for install, and then dig into it and de-select parts of the task that you don’t want. On the other hand,apt-get has no support for tasks, and aptitude is better even than special purpose tools like tasksel.
Which of these do you use on a regular basis and why? We’d love to hear from you in our comments section below. Thank you for visiting Base64!