6

I want to switch from Debian Buster to Debian Bullseye. After doing this, can I return all Bullseye packages to Buster? (Unupgrade packages)

2 Answers 2

9

Stephen Kitt is correct. It's not supported. But if you have nothing to lose, this is how you'd do it:

  1. Set your sources to buster:

    sudo sed -i                \
      -e 's/bullseye/buster/g' \
      -e 's/unstable/buster/g' \
      -e 's/stable/buster/g'   \
      -e 's/testing/buster/g'  \
      -e 's/sid/buster/g'      \
      /etc/apt/sources.list    \
      /etc/apt/sources.list.d/*
    
  2. Tell apt to set buster as your preferred release and set a priority that allows downgrades by creating /etc/apt/preferences.d/buster with this:

    Package: *
    Pin: release n=buster
    Pin-Priority: 1001
    
  3. Say a little prayer

  4. Perform the "upgrade":

    # Upgrade
    sudo apt update
    sudo apt upgrade
    sudo apt dist-upgrade
    sudo apt --fix-broken install
    sudo apt autoremove
    
  5. Cycle through upgrade, dist-upgrade, --fix-broken install and autoremove over and over until apt finishes successfully everywhere.

  6. Celebrate because if you get here, then things probably worked out ok.

  7. Remove /etc/apt/preferences.d/buster so it doesn't affect you in the future.

1
  • I followed your procedure and it worked pretty well - I had to apt remove some stuff manually because they were conflicting when doing apt upgrade, and dist-upgrade failed the first time but in the end everything looks fine. Just a warning: do not try this through SSH because the dist-ugprade just kicked me during the process and I had to restore a snapshot.
    – Holt
    Commented Oct 27, 2022 at 8:12
8

Technically, you can, but downgrades aren’t supported and we don’t test them. The downgrade might work fine, but it might not, and Bullseye is now sufficiently far ahead of Buster that I wouldn’t try it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .