apt-get undo

Problem: after updating system with apt-get upgrade a programm will not work anymore because of dependency-problems.
Solution: downgrade a package
Steps:

  • find last installed version of the package, e.g. look at install trace:
    ...
    Preparing to replace package VERSION (using .../package_NEWVERSION_i386.deb) ...
    ...
  • if no apt-get clean was done the old package is still stored in the system, look at /var/cache/apt/archives/ otherwhise look at http://snapshot.debian.net/archive/ for an older package version (a look at the debian archive will show you since when the new version was integrated in debian, so you have a clue for searching http://snapshot.debian.net)
  • after one has found the „old“ package it can be installed with: dpkg -i package_OLDVERSION_i386.deb
  • to prevent the update of this package in funture by apt-get upgrade, set the package status to hold:
    echo package "hold" | dpkg --set-selections

Schreibe einen Kommentar