Downgrade from Debian SID to Stable from Jessie to Wheezy

Jules

Jules is the owner and author of ISPIRE.ME. He's a Linux System Engineer, Tech fanatic and an Open Source fan.

You may also like...

27 Responses

  1. Jacob says:

    Thanks a lot.

  2. Ola says:

    If i installed jessie initially (not upgrade), can I still downgrade to wheezy?

  3. kurtos says:

    Well explained.
    Thanks.

  4. Stefan says:

    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.

  5. ahes says:

    For me ‘apt-get dist-upgrade’ worked.

  6. BootLoop says:

    Thanks. You just saved my bacon. +1 times a billion.

  7. Justin Pretorius says:

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

    • Jules says:

      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 😉

  8. haek says:

    There is no /etc/apt/preferences only /etc/apt/preferences.d exists

  9. axkibe says:

    In my case it didn’t work.

    Issue with systemd vs. sysvinit.

    I learned that I was supposed to switch from systemd back to sysvinit-core and do a reboot to use that one before downgrading package versions. This way the installer keept stoping because it couldn’t remove systemd. I tried to go back up jessie, install sysvinit-core and do a reboot, unfortunally the system was left in so an unusuable state, it didn’t boot.

    I ended up putting a wheezy installer USB on it, removing everything but the home folder from install root and do a clean reinstall to wheezy.

    • Jules says:

      Where it stopped to boot finally? What error messages you get?
      For me it sounds more like an shell issue. Probably default shell were set to dash and thus will break up init scripts at all.
      dpkg-reconfigure dash – whats selected there (yes/no)?

      • Axel Kittenberger says:

        It won’t let one deinstall systemd while the system is running systemd, I searched about that and the common opinion was one should revert the system to use sysvinit-core then reboot, than remove or purge systemd. However I couldn’t reboot since the system was currently broken, but I also couldn’t fix to the previous state, since package management keept refusing to let go of the systemd package, with all kind of dependencies. I can’t answer questions anymore, since I reinstalled wheezy the proper way already, using an usb stick and moving the testing system with an installer shell out of place.

        So my idea is, before you downgrade install sysvinit-core and revert to it before downgrading. Maybe your jessie was not yet converted to systemd before the downgrade? Or likely I just did something wrong missing a proper force, just -f didnt cut it.

        In this case it wasn’t a big issue since I had physical access to the machine anyway, I was at first just lazy to do it the debian adviced way.

        • Scott says:

          Same thing happened to me just barely. I SSH’d into my machine to do this from work, and it totally hosed my machine because systemd couldn’t be switched out. Probably want to make sure you add info about switching to sysvinit-core before downgrading current jessie.

  10. Khurram says:

    I get this problem after removing the systemd package. System isnt booting, so I am doing this all in chroot. Kindly advise.

    # apt-get install -f
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Correcting dependencies… Done
    The following packages were automatically installed and are no longer required:
    app-install-data docutils-common docutils-doc gdebi-core gnustep-base-common
    gnustep-base-runtime gnustep-common gnustep-gui-common hplip-data
    i965-va-driver ieee-data ipxe-qemu libaio1 libaqbanking-data libaqbanking34
    libaqofxconnect7 libarchive12 libart-2.0-2 libasan1 libasn1-8-heimdal
    libatomic1 libavresample2 libavutil54 libbfio1 libboost-thread1.55.0
    libbrlapi0.5 libcap2-bin libchromaprint0 libcogl-common libdrm-nouveau2
    libdvbpsi9 libebml4 libelf1 libepoxy0 libewf2 libfdt1 libfreerdp1
    libgles2-mesa libglib2.0-bin libgnustep-base1.22 libgssapi3-heimdal
    libgutenprint2 libgwenhywfar-data libgwenhywfar60 libhcrypto4-heimdal
    libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libiscsi1
    libiscsi2 libjson-c2 libkrb5-26-heimdal libktoblzcheck1c2a libldb1
    liblua5.2-0 libmatroska6 libntdb1 libobjc4 libopenvg1-mesa
    libpackagekit-glib2-14 libpam-cap libproxy-tools libproxy1 libqpdf13
    libroken18-heimdal libseccomp2 libsnmp-base libspice-server1 libswscale3
    libsystemd-daemon0 libsystemd-id128-0 libsystemd-journal0 libtevent0
    libtsk10 libtxc-dxtn-s2tc0 libubsan0 libusageenvironment1 libusbredirparser0
    libusbredirparser1 libvdeplug2 libwebrtc-audio-processing-0 libwind0-heimdal
    libxen-4.1 libxmlsec1 libxmlsec1-gcrypt libxmlsec1-gnutls
    linux-headers-3.14-1-common linux-headers-3.14-2-common linux-kbuild-3.14
    openbios-ppc openbios-sparc openhackware packagekit packagekit-backend-aptcc
    packagekit-tools pulseaudio-utils python-crypto python-debian
    python-docutils python-ldb python-ntdb python-packagekit python-pexpect
    python-ply python-pycparser python-pygments python-renderpm python-reportlab
    python-reportlab-accel python-roman python-six python-talloc python-tdb
    python-wstools python3-apt python3-chardet python3-dbus python3-six
    qemu-keymaps qemu-slof qpdf rtkit seabios sharutils tk va-driver-all
    vdpau-va-driver vgabios
    Use ‘apt-get autoremove’ to remove them.
    The following extra packages will be installed:
    gcc hplip-data libaqbanking34 libpython2.7 libsmbclient libxmlsec1-gcrypt
    libxmlsec1-gnutls python python2.7 python2.7-minimal
    Suggested packages:
    gcc-multilib autoconf automake1.9 libtool flex bison gdb gcc-doc hplip
    aqbanking-tools python-doc python-tk python2.7-doc
    Recommended packages:
    libaqbanking-plugins-libgwenhywfar60
    The following packages will be REMOVED:
    gcc-4.9 libaqbanking34-plugins libaqebics0 libaqhbci22 libpython-stdlib
    libpython2.7-stdlib python-cffi python-cryptography python-debianbts
    python-defusedxml python-reportbug python-soappy
    The following packages will be DOWNGRADED:
    gcc hplip-data libaqbanking34 libpython2.7 libsmbclient libxmlsec1-gcrypt
    libxmlsec1-gnutls python python2.7 python2.7-minimal
    0 upgraded, 0 newly installed, 10 downgraded, 12 to remove and 150 not upgraded.
    10 not fully installed or removed.
    Need to get 0 B/14.5 MB of archives.
    After this operation, 16.9 MB disk space will be freed.
    Do you want to continue [Y/n]?
    Could not find platform independent libraries
    Consider setting $PYTHONHOME to [:]
    ImportError: No module named site
    Can not write log, openpty() failed (/dev/pts not mounted?)
    (Reading database … 131465 files and directories currently installed.)
    Removing python-cryptography …
    Could not find platform independent libraries
    Consider setting $PYTHONHOME to [:]
    ImportError: No module named site
    dpkg: error processing python-cryptography (–remove):
    subprocess installed pre-removal script returned error exit status 1
    Could not find platform independent libraries
    Consider setting $PYTHONHOME to [:]
    ImportError: No module named site
    dpkg: error while cleaning up:
    subprocess installed post-installation script returned error exit status 1
    Removing python-cffi …
    Could not find platform independent libraries
    Consider setting $PYTHONHOME to [:]
    ImportError: No module named site
    dpkg: error processing python-cffi (–remove):
    subprocess installed pre-removal script returned error exit status 1
    Removing python-reportbug …
    Could not find platform independent libraries
    Consider setting $PYTHONHOME to [:]
    ImportError: No module named site
    dpkg: error processing python-reportbug (–remove):
    subprocess installed pre-removal script returned error exit status 1
    Removing python-debianbts …
    Could not find platform independent libraries
    Consider setting $PYTHONHOME to [:]
    ImportError: No module named site
    dpkg: error processing python-debianbts (–remove):
    subprocess installed pre-removal script returned error exit status 1
    Removing python-soappy …
    Could not find platform independent libraries
    Consider setting $PYTHONHOME to [:]
    ImportError: No module named site
    dpkg: error processing python-soappy (–remove):
    subprocess installed pre-removal script returned error exit status 1
    Removing python-defusedxml …
    Could not find platform independent libraries
    Consider setting $PYTHONHOME to [:]
    ImportError: No module named site
    dpkg: error processing python-defusedxml (–remove):
    subprocess installed pre-removal script returned error exit status 1
    Errors were encountered while processing:
    python-cryptography
    python-cffi
    python-reportbug
    python-debianbts
    python-soappy
    python-defusedxml
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    I am unable to delete these packages too.

    • Todd says:

      Got this aswell, fixed it by doing:
      apt-get autoclean
      apt-get clean
      apt-get purge python2.7-minimal
      (errors will ensue)
      apt-get update
      apt-get download python2.7 python2.7-minimal libpython
      dpkg -i python*.deb
      apt-get update
      apt-get upgrade

      and everything will work out fine.

  11. Gertjan says:

    the command apt-get dist-upgrade was not working.
    I tried apt-get upgrade ,and that was good

  12. Stan says:

    Nice tutorial… and very well explained.
    Thanks a lot! You’ve saved my day.

  13. C2884 says:

    humm.. for me apt-pinning should’t be working. It barely downgraded. just a few packages and all others stayed in the jessie versions, including kernel, xorg-server, sshd, etc..

    • Jules says:

      Hi,

      I wrote this article for SID release originally and it might be because Jessie is a stable release also now, so apt-pinning with target=stable will match against it also now.

      Try changing apt-pinning line from Pin: release a=stable to Pin: release n=wheezy and report back if that helps.

      • Artjom says:

        That worked for me (not the original poster of the question, but I had the same problem.)

        Thank you for writing this up!

  14. Hoser says:

    Yeaaaah, I ran the steps as you so say “easily”
    Midway through the removal of a ton of packs, it cuts off my network connection, all other units in home online, and now viola, like the fire crew came and just HOSED it … thanks

    Thats one thing about following these seemingly adviseable tutorials…. BLEH!

  15. Ivo says:

    Thank you, man. I was missing preferences file and it fixed my wheezy 🙂

  16. Felipe Lopes says:

    It seems simple but at the end of “apt-get remove –purge –auto-remove systemd” I had no connection at all,
    this step removed networkmanager. I had to create an usb stick with debian wheezy and reinstall the system.

Leave a Reply

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

Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.