Anyone care for reigniting the apt-get vs. aptitude flamewar?
May 16, 2011 10:02 AM

Help me recover from switching back and forth between apt-get and aptitude in Debian.

I recently started using aptitude instead of apt-get to manage packages on my Debian installation (testing, with some apt-pinning from unstable). Only afterwards did I discover that this is something of a bad idea; apt-get now complains about hash sum mismatches whenever I do:
# apt-get update
and aptitude refuses to do much of anything when I do:
# aptitude update && aptitude upgrade
although it does load the various repositories. Distressingly, neither
# apt-cache policy packagename
nor
# aptitude versions packagename
return any information about the repository that a given package was installed from.

Is there anything I can do to resolve this without reinstalling the system (something I can do as a last resort, since everything's backed up, but it'd be a pain)? And if I do manage to clear it up, which should I be using (presumably to the exclusion of the other) in the future, apt-get or aptitude?
posted by a small part of the world to Computers & Internet (12 answers total) 3 users marked this as a favorite
I'd take it to the Debian forums, they're a bit more specialized and more likely to be helpful. But you probably know that.
Good luck. Sounds like the kind of mess I find myself in on a regular basis, a little bit of knowledge being a dangerous thing.
posted by Stagger Lee at 10:17 AM on May 16, 2011


> a little bit of knowledge being a dangerous thing.

Too true in my case. I did search through the Debian forums, where it seems like the group consensus is that one's goose is cooked in this kind of situation; I had hoped that if there was a magical solution out there, it would turn up on AskMe. ;)
posted by a small part of the world at 10:27 AM on May 16, 2011


I've never had to deal with this before, but if you're familiar with using IRC, Freenode's #debian channel has over 1000 people in it. You could probably get an answer right quick there.
posted by rhizome at 10:30 AM on May 16, 2011


Thanks, Stagger Lee and rhizome.

After a little more rooting around on the forums, I found the following commands:
# apt-get clean
# aptitude clean
# aptitude forget-new
Which have at least cleared up the troubles I was having with the repository caches. apt-cache policy and aptitude versions now display the current versions for packages.

I'll stick to using aptitude, but since I installed so many packages using apt-get before, it's likely that I'll have some unused libraries lingering in the background. Which doesn't really bother me.

So: use apt-get, or aptitude, but not both. Here endeth the lesson.
posted by a small part of the world at 12:27 PM on May 16, 2011


Guess that clears up that. I've been using apt-get, aptitude, synaptic and sometimes dpkg. Guess that's why they never seem to do exactly what I think they should.
posted by zengargoyle at 2:13 PM on May 16, 2011


zengargoyle, I hadn't even thought about dpkg, which I do use occasionally when I install packages that aren't listed in the repositories. It hadn't occurred to me that it might not play nicely with apt-get and aptitude. Is there a specific form of (mis)behavior that you're referring to? Maybe we're experiencing similar problems.

As to Synaptic, I believe that it's a frontend to apt-get and not aptitude. I assume that its behavior is therefore identical to apt-get's.
posted by a small part of the world at 2:22 PM on May 16, 2011


I used to use aptitude, but it led me into dependency hell one day. I had to uninstall set of packages X, because it didn't like set of packages Y, but when I then tried to install set of packages Y, there was a package Z it was dependent upon -- which was in the group of packages X. I could never narrow it down to which package was doing what, so I reinstalled and quit using aptitude.

Nowadays I switch between apt-get and synaptic, and have never had any trouble related to it. I am fairly certain that you're correct about synaptic being a front end to apt-get.
posted by no relation at 4:18 PM on May 16, 2011


I am fairly certain that you're correct about synaptic being a front end to apt-get.

Yes, that's correct.
posted by chrisamiller at 6:03 PM on May 16, 2011


This is the world's most pointless flamewar. Synaptic, aptitude and apt-get are all front-ends to the apt library. Which front-end you use matters not a whit. If your package cache gets all hosed up, it's got nothing to do with your having used a mix of front-ends; it's more likely to be down to creating your own dependency hell by pinning things that other things depend on, or aborting installations halfway through.
posted by flabdablet at 6:03 PM on May 16, 2011


Also:
aptitude remove package
is equivalent to
apt-get remove package; apt-get autoremove

posted by flabdablet at 6:08 PM on May 16, 2011


If your package cache gets all hosed up, it's got nothing to do with your having used a mix of front-ends; it's more likely to be down to creating your own dependency hell by pinning things that other things depend on, or aborting installations halfway through.

And here I was thinking I was being so clever by using apt-pinning...
posted by a small part of the world at 6:29 PM on May 16, 2011


You probably were. But pinning things does sometimes cause dependency trouble; personally I treat it as a last resort.
posted by flabdablet at 7:28 PM on May 16, 2011


« Older How do I remove my mental connection between food...   |   I'm Too Big and Dumb for My VPS. Newer »
This thread is closed to new comments.