How to upgrade Debian 10 (buster) to 11 (bullseye)

    Upgrade the current stretch installation to the latest packages.

    apt update && apt upgrade && echo OK

     

    Install the gcc-8-base package.

    apt install gcc-8-base

     

    Perform database sanity and consistency check.

    dpkg --audit

     

    Fix any output from this command.Check for any packages which are held back.

    apt-mark showhold

     

    Point apt to the buster sources.

    sed -e 's/^deb/#deb/g' -i /etc/apt/sources.list


    cat << EOF >> /etc/apt/sources.list

    deb http://deb.debian.org/debian bullseye main contrib non-free

    deb http://deb.debian.org/debian bullseye-updates main contrib non-free

    deb http://security.debian.org/debian-security bullseye-security main
    deb http://ftp.debian.org/debian bullseye-backports main contrib non-free
    EOF

     

    Perform the upgrade, downloading packages in advance.

    apt update && apt clean && echo OK

    apt full-upgrade -d -y && echo OK

    apt full-upgrade -y && apt clean && echo OK

     

    Reboot.

     

    No questions yet.