When we speak of Debian Linux distribution, the number one thing that come into our minds is its flag-ship utility apt-get . Infact this package management is so popular that a large part of Debian’s popularity revolves around it. Ask any person why he or she thinks Debian is a better distribution and in 7 out of 10 cases the answer will be apt-get. Here is a consice but very complete article on using apt-get and dpkg the backend for apt-get.
isn’t aptitude considered the recommended tool to use for CLI package management now days?
Don’t know. But I have never used aptitude and don’t seem to miss it. People say that aptitude is greater, but “if it ain’t broke, don’t fix it”. So I keep using apt-get, though maybe I should use aptitude.
I think apt-get is easier than aptitude, however that’s a subjective matter, just like fdisk vs cfdisk (I like fdisk)
I like cfdisk
Less calculation to do in order to hit cylinder boundaries, and nicer looking UI.
I think apt-get is easier than aptitude
That doesn’t make any sense. Aptitude’s UI is a subset of apt-get’s. Just replace “apt-get” with “aptitude”, IOW: aptitude update; aptitude install hello (etc).
Of course, Aptitude also has a curses-based UI and other stuff, but you can ignore all of that if you don’t need it.
I think aptitude is the recommended option. It has more sophisticated problem-solving options. But personally I find the interface enough to induce psychosis and stick to apt and if I need it synaptic where possible. Out of the box, aptitude also treats recommended packages as dependencies, I think. This means that mixing apt and aptitude together can produce different results and probably isn’t a good idea.
There are a couple of other nice things about apt on Debian, like apt listbugs, so you can check first whether you want to install potentially borked packages on Testing or Unstable. All over, it’s very thorough.
The other half of the story, I think, is the very good packaging of Debian files that lies behind apt. I also run apt on SuSE but I wouldn’t feel so confident about doing a big apt-get upgrade there. On Debian I can feel confident that the whole process will run smooth as butter.
many other distributions including non-Debian based ones are using apt-get too.
Apt-get is not the thing which makes Debian look different. I used it as well on Fedora Core 2 (and 3), with synaptic.
Apt-get is good, but not limited to Debian-based distros only. So if people use this as the reason for why Debian is so good, they really don’t know what other distributions are capable of.
Certainly you can use apt on other distros, however in my experience the repositories are much slimmer and the package inter-dependencies less well thought out (and more prone to conflicts)
Aahh.. the conflicts.. the reason why I shifted to LFS after having considered FreeBSD and Gentoo (which is my system today – it’s LFS with cheats enabled )
On Fedora you can use SmartPM instead, which efficiently solves most of the conflicts you’re bound to meet with that distro. Oh, I really hated those conflicts.
OK, this is a dpkg primer for new Debian users, but sooner or later everybody will have to use dpkg –force, especially dpkg –force-overwrite, because dpkg not being able to overwrite a file from one package with another is one of the most common error messages which need manual intervention.
“dpkg –force-help” is your friend 🙂
I do recall back in the day when I used to mix packages from Stable/Testing/Unstable (plus a few third party repositories) that now and then I had to use the –force, but after moving entirely to Unstable (and only a single third party repository) about three and half years ago, I’ve have not had to invoke it since.
Well, in fact it doesn’t happen very often, and certainly a lot less often than in the past.
As to using Unstable only, Sid has been in a total mess a couple of times in the last 6 month. So I still prefer to use mixed repos, pinned to Testing.
You are experiencing poorly designed packages. Good packages use something called diversions to get around this. Basically they move the file out of the way, and let the system know they did this.
Not doubt it, cfdisk is by far the easiest. Hands down. But getting back to the main topic: Why bother learning Aptitude when Apt-get does it all? No, for this Linux fan, Apt-Get is it!
Because aptitude will remember what packages were installed as dependencies for a specific package, so that when you remove said package, everything that was installed as a dependency will be removed along with it. apt-get does not do this. Aptitude is also much better at solving conflicts — it knows what to remove/install to make things work (most of the time)
Besides, there is no learning how to use aptitude if you already know apt-get — just replace apt-get by the word aptitude in your commands
aptitude update
aptitude upgrade
aptitude install whatever
Aptitude is the ncurses version of Synaptic, basically.
I’ve never once used Synaptic as I would find a GUI-based APT tool to be cumbersome when compared to the likes of apt-get.
I have indeed experienced problems when using both apt-get and Aptitude so I find using Aptitude to search for the package in the first place (if I don’t know the name already!) and then carry out the installation via apt-get. I know I can use apt-cache to search but I’m just lazy that way 😉
As for using APT with other distro’s, I find they just don’t quite work as well as a distro where APT is the native package manager. Still, it’s always nice to have the option available and all I can say is a big thank you to all the hard working developers out there that make APT what it is; an excellent, easy to use tool that rarely breaks.
I stopped using debian and use arch linux now. Because pacman is better then apt-get.
And for some other minor reasons..
I find that dpkg-reconfigure <package> is useful at times. Many a time I have had to use:
dpkg-reconfigure xserver-xfree86
to reconfigure X, usually to bump the resolution up from 800×600 to 1024×768.
That (debconf) is another great Debian feature which people often forget, whilst everybody knows about apt.