Downgrade from Debian SID to Stable from Jessie to Wheezy

Downgrade from Debian SID to Stable from Jessie to Wheezy

Downgrade from Debian SID to Stable from Jessie to Wheezy
Logo of the Debian GNU/kFreeBSD project Credit: Debian/Open Use Logo Licence.

Downgrade from Debian SID to Stable from Jessie to Wheezy. This Tutorial describes the downgrade process you need to run to ge back stable rel after sid upgrade. Recently, a problem occurred on my server after i had upgraded my system with the SID repository in my sources.list. The Debian release jessie came out and after upgrading to this release some services no longer ran properly anymore. So I had to run a task to get back to Wheezy to recover the failing services.

So here are the few easy steps you will need to downgrade a Debian SID release to Wheezy or any kind of other release you like:

First of all you have to remove or replace all SID tags from your /etc/apt/sources.list to your preffered target release

Mine sources.list file looks like this after changes have made:

deb wheezy/updates main
deb-src wheezy/updates main

deb wheezy main contrib non-free
deb-src wheezy main contrib non-free

Now we have to use the Apt-Pinning feature to get the correct default release tag for our apt downgrade

Modify or create the file /etc/apt/preferences and put following text in it:

Package: *
Pin: release a=stable
Pin-Priority: 1001

Finally we have to run the apt update and upgrade process for downgrading all packages

So you will need to enter these two commands to finish the downgrade process:

apt-get update
apt-get upgrade
apt-get dist-upgrade

Apt will ask you for downgrading all packages now.
Just say yes, let it go and pray that all packages getting installed and downgraded properly!

If some packages failing on downgrade you have to purge them by doing:

apt-get purge yourfailingpackage

And reinstall them with apt-get install yourfailingpackage after purging it.

12 thoughts on “Downgrade from Debian SID to Stable from Jessie to Wheezy”

  1. Thanks! I actually had to do an additional ‘apt-get dist-upgrade’ to downgrade packages with assumingly a different version number in the two editions.

  2. Thanks so much, an excellent article for something that should be easily found in the Debian manuals

    1. Well it’s not the best but working solution. Debian would never recommend it since it also can break your whole system.
      But if you have just this only chance it will do and mostly well ;-)

Leave a Reply

Your email address will not be published. Required fields are marked *



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>