Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

It appears that the aptitude state is corrupt - note that apt-get and the other dpkg tools still work fine. Is there some way to reset the state of aptitude?

Signs of corruption:

  • aptitude search shows packages as 'p' (purged/never installed) when they are installed.
  • If I try and aptitude safe-upgrade it tells me I need to uninstall half my system! But apt-get upgrade and the GUI update manager continue to work fine.

I find aptitude search very handy because of the package state information, so I would like to get that back again.

Note I am using 11.10, though I originally installed 9.10 and have upgraded through each release (and generally upgraded when the next release was in beta).

share|improve this question

1 Answer 1

From the documentation aptitude stores its own state (separate from the state of apt-get or dpkg) in /var/lib/aptitude/pkgstates and there may also be a configuration in ~/.aptitude/config. Moving those files out of the way could help aptitude recover a sane state. As other tools are working, there's no harm in trying:

sudo mv /var/lib/aptitude/pkgstates /root/aptitude.pkgstates.backup
mv .aptitude .aptitude.backup

If aptitude starts working properly after those changes, you can remove the backups. If not, you can just put them back and try some other solution.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.