Last active
March 27, 2025 05:17
-
-
Save rrottmann/b0f371a62950a9e149c4358772c5a647 to your computer and use it in GitHub Desktop.
Dist-Upgrade Debian 10 Buster to Debian 12 Bookworm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Debian 10 | |
apt-get -y update | |
apt-get -y upgrade --without-new-pkgs | |
apt-get -y full-upgrade | |
cat > /etc/apt/sources.list <<"EOF" | |
deb http://deb.debian.org/debian/ bullseye main | |
deb-src http://deb.debian.org/debian/ bullseye main | |
deb http://security.debian.org/bullseye-security bullseye-security/updates main | |
deb-src http://security.debian.org/bullseye-security bullseye-security/updates main | |
deb http://deb.debian.org/debian/ bullseye-updates main | |
deb-src http://deb.debian.org/debian/ bullseye-updates main | |
EOF | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 605C66F00D6C9793 6ED0E7B82643E131 0E98404D386FA1D9 | |
apt-get clean | |
apt-get -y update | |
apt-get -y upgrade --without-new-pkgs | |
apt-get -y full-upgrade | |
shutdown -r now | |
# Debian 11 | |
cat > /etc/apt/sources.list <<"EOF" | |
deb http://deb.debian.org/debian/ bookworm main | |
deb-src http://deb.debian.org/debian/ bookworm main | |
deb http://security.debian.org/bookworm-security bookworm-security/updates main | |
deb-src http://security.debian.org/bookworm-security bookworm-security/updates main | |
deb http://deb.debian.org/debian/ bookworm-updates main | |
deb-src http://deb.debian.org/debian/ bookworm-updates main | |
EOF | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BDE6D2B9216EC7A8 | |
apt-get clean | |
apt-get -y update | |
apt-get -y upgrade --without-new-pkgs | |
apt-get -y full-upgrade | |
# issue with libcrypt.so.1 | |
cd /tmp | |
apt -y download libcrypt1 | |
dpkg-deb -x libcrypt1_1*a4.4.25-2_amd64.deb . | |
cp -av lib/x86_64-linux-gnu/* /lib/x86_64-linux-gnu/ | |
apt -y --fix-broken install | |
apt-get -y upgrade --without-new-pkgs | |
apt-get -y full-upgrade | |
apt-get -y auto-remove | |
shutdown -r now |
Note
2024-9-29 for the total updated scripts including all the suggestion above and tested well
Tags: Debain
Created: September 29, 2024 12:50 PM
Updated: September 29, 2024 1:09 PM
1. Debian10 - Debian11
apt-get -y update
apt-get -y upgrade --without-new-pkgs
apt-get -y full-upgrade
cat > /etc/apt/sources.list <<"EOF"
deb http://deb.debian.org/debian/ bullseye main
deb-src http://deb.debian.org/debian/ bullseye main
deb http://security.debian.org/debian-security bullseye-security/updates main
deb-src http://security.debian.org/debian-security bullseye-security/updates main
deb http://deb.debian.org/debian/ bullseye-updates main
deb-src http://deb.debian.org/debian/ bullseye-updates main
EOF
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 605C66F00D6C9793 6ED0E7B82643E131 0E98404D386FA1D9
apt-get clean
apt-get -y update
apt-get -y upgrade --without-new-pkgs
apt-get -y full-upgrade
shutdown -r now
2. Debian11 - Debian12
cat > /etc/apt/sources.list <<"EOF"
deb http://deb.debian.org/debian/ bookworm main
deb-src http://deb.debian.org/debian/ bookworm main
deb http://security.debian.org/debian-security bookworm-security main
deb-src http://security.debian.org/debian-security bookworm-security main
deb http://deb.debian.org/debian/ bookworm-updates main
deb-src http://deb.debian.org/debian/ bookworm-updates main
EOF
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BDE6D2B9216EC7A8
apt-get clean
apt-get -y update
apt-get -y upgrade --without-new-pkgs
apt-get -y full-upgrade
# issue with libcrypt.so.1
cd /tmp
apt -y download libcrypt1
dpkg-deb -x libcrypt1_*.deb .
cp -av lib/x86_64-linux-gnu/* /lib/x86_64-linux-gnu/
apt -y --fix-broken install
apt-get -y upgrade --without-new-pkgs
apt-get -y full-upgrade
apt-get -y auto-remove
shutdown -r now
Why run both
apt-get upgrade
andapt-get full-upgrade
instead of just runningapt-get full-upgrade
to do all of the upgrades in one go?
Because that's what you do, stop asking such questions.
Correct on the 10 to 11 changes for security.
keyword buster/updates should be replaced with bullseye-security:
Original is:
deb http://deb.debian.org/debian buster main
deb-src http://deb.debian.org/debian buster main
deb http://security.debian.org/debian-security buster/updates main
deb-src http://security.debian.org/debian-security buster/updates main
deb http://deb.debian.org/debian buster-updates main
deb-src http://deb.debian.org/debian buster-updates main
Updated for bullseye as:
deb http://deb.debian.org/debian/ bullseye main
deb-src http://deb.debian.org/debian/ bullseye main
deb http://security.debian.org/debian-security bullseye-security main
deb-src http://security.debian.org/debian-security bullseye-security main
deb http://deb.debian.org/debian/ bullseye-updates main
deb-src http://deb.debian.org/debian/ bullseye-updates main
gnupg was missing on debian 10 so the script failed on line 15
gnupg was missing on debian 10 so the script failed on line 15
Use hkp://keyserver.ubuntu.com:80 instead
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Agree with Alexey and others after - change the url its fine.
The libcrypt I didn't have to deal with. However! usrmerge!
They are merging filesystems and links in /usr
I did NOT install usrmerge prior to upgrade from 11 to 12 - and ran into issues. If I installed the usrmerge after 11, but before 12, it all worked fine.