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).


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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