DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ok guys, i'm still fairly new to Debian, and Gnu/Linux for that matter so go easy on me if i appear ignorant or stupid.
To my understanding, aptitude is the preferred and recommended tool for package management. Apt-get seems to have become obsolete, so why is apt-get stil in use?
aptitude is better at dependency resolution, often to the point that it will refuse to do anything until a broken dependency has been satisfied. apt-get is still not as thorough, despite claims that is has caught up. Both have some powerful options most of which the normal user never uses (see man pages). But aptitude gives the user more control IMO and also has the ncurses UI, if you run it without arguments.
apt-get is still the recommended tool for distribution upgrades however and I can confirm that it does do a better job as it just gets on with it and upgrades everything without making a fuss.
The problem with mixing aptitude and apt-get is that they can get out of sync. If you install and remove a lot of packages with apt-get, it's often the case that "aptitude -f install" will try to reinstall them all again because apt-get failed to clean up properly - they also often contradict each other when installing recommends/suggests. So in general, but this is just an opinion: aptitude for every day usage, apt-get for dist-upgrade or other rare occasions.
In fact, in new versions of Ubuntu there is no aptitude by default, they use apt-get as standard tool for the command line. I personally always have used apt-get/apt-cache/apt-file in my Debian times, just because I was used to them.
I know of no advantages of apt-get except that's it's installed by default on Ubuntu and aptitude isn't. So when giving advice to people you have to consider that they may not have installed it.
so why is apt-get better at distro upgrades? what advantage does it offer over aptitude. why dont the developers get together and combine there efferts into just one of them.
IIRC some time ago (few years?) Debian started recommending aptitude over apt-get, at that time I made the switch. However, as of the squeeze release apt-get was the recommended method of performing the upgrade. See:
Apparently, apt-get has somewhat caught up with aptitude in terms of dependency resolution and feature set. I'm not sure what is currently recommended in terms of everyday package installation. I'm still using aptitude, but since I almost never use it in the interactive mode, I'd be more than happy to switch back to apt-get and apt-cache.
widget has about summed it up the best. But like craigevil I like to use ' aptitude search packagename ' and ' aptitude versions packagename '. If you are using Debian Stable then either one will work equally well the difference is in Testing and Unstable and there you need to know how to use both plus dpkg.
The aptosid page has some interesting things to say about apt-get for installing and dist-upgrades-
Quote:
The Reasons NOT to use anything else but apt-get for a dist-upgrade
Package managers like adept, aptitude, synaptic and kpackage are not always able to account for the huge amount of changes which happen in Sid (depedency changes, name changes, maintainer script changes, ...).
This is not the fault of the developers of those tools though, they write a excellent tools and fabulous for the debian stable branch, they are simply just not suitable for the very special needs of Debian Sid.
Use whatever you like to search for packages, but stick with apt-get for actually installing/removing/dist-upgrading.
Package managers like adept, aptitude, synaptic and kpackage are at the least, non-deterministic (for complex package selection), mix that with a quickly moving target like sid and even worse an external repository of questionable quality (we don't use or recommend those, but they're a reality on your user systems) and you will be courting disaster.
The other item to note is that all of these types of GUI package managers need to run in in X, and in doing a dist-upgrade in X, (or even an 'upgrade' which is not recommended), you will end up damaging up your system beyond repair, maybe not today or tomorrow, however in time you will.
apt-get on the other hand strictly does what it is asked to do, if there is any breakage you can pinpoint and debug/ fix the cause, if apt-get wants to remove half of the system (due to library transitions) it's the admin's call (that means you) to have at least a serious look.
This is the reason why debian builds use apt-get, not the other package manager tools.
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900
Rep:
Ok here's a negative against apt-get, even though it is my preference to. When updating/upgrading my Sid/Experimental system apt-get will read the change logs and some it will show in the terminal and there is no-way I can then get back to upgrading. I then have to close the terminal and resort to (please don't hit me Widget ) Update Manager or Synaptic so I can upgrade. Has anyone else had this?
The changelogs may be displayed using something like "less" (I can't say for sure as I don't use apt-listchanges), try hitting "q" and see if it resumes from there.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.