2015-12-28

HOWTO: preventing aptitude from breaking the APT package setup

Initial conditions:
  • usually, you use apt-get (from the apt package) for Debian package maintenance (installing, removing, upgrading etc.);
  • sometimes you launch aptitude (aptitude package) to do some work;
  • after doing some work with apt-get, you notice that aptitude hasn't caught up with the current package state (i. e., it wants to install / remove some package(s) just from the start).
Solution: hide (or delete) the outdated package states file from aptitude (note: it'll overwrite an old backup, "/var/lib/aptitude/pkgstates.old", if present):
$ cd /var/lib/aptitude
# mv pkgstates pkgstates.old
P. S. This should also work for Debian derivatives (e. g. Ubuntu).

No comments:

Post a Comment