How to Upgrade Debian 10 (Buster) to Debian 11 (Bullseye)

Debian 11, codenamed ‘bullseye’ was released on August 10th after nearly two years of development. This is a stable release and will receive support for the next 5 years just like any other Debian stable version. Debian 11 comes with major software improvements and other enhancements which include:

  • Linux Kernel  5.10 LTS. This is an improvement from Kernel 4.19 that was used by Debian 10 Buster.
  • New versions of Desktop environments including GNOME 3.38, MATE 1.24, KDE Plasma 5.20, LXDE 11, LXQt 0.16, and Xfce 4.16.
  • A new theme known as the Homeworld theme that was inspired by an art style born in Germany called Bauhaus movement.
  • In Debian 11, over 40,000 software packages have newer versions. With Debian 11, you will get LibreOffice 7.0, Apache 2.4.48, MariaDB 10.5, Python 3.9.1, and PostgreSQL 13 to mention a few. You can have a glance at the entire list by heading over to the release notes.
  • CUPS and driverless printing.
  • Support for exFAT filesystem.
  • Support for numerous architectures:  64-bit & 32-bit PC, 64-bit ARM (Arch 64. IBM System Z, POWER Processors, EABI ARM, 64-bit MIPS among others.

That was just an overview of what Debian 11 provides. Let’s now focus on how you can upgrade from Debian 10 Buster to Debian 11.

Step 1)  Perform a backup of all your files

Before upgrading to a new OS release, it’s always recommended to have a backup of all your files. This ensures that your files are safe in case something goes wrong during the upgrade that can lead to file corruption. Here is a list of backup & recovery software tools that you can use to safely backup all your data before proceeding.

Step 2) Update package lists & Upgrade packages

We will start by verifying that we are currently using Debian Buster as shown

$ cat /etc/os-release

Alternatively, you can run the command:

$ cat /etc/debian_version

Debian-OS-Release-Command

Next, proceed and update the package index and upgrade the software packages by running:

$ sudo apt update -y && sudo apt upgrade -y

Debian10-Apt-Upgrade-Command

Next, run the dist-upgrade command shown. In addition to upgrading the packages, it also handles changing of dependencies with new versions of packages installed.

$ sudo apt dist-upgrade

Dist-Upgrade-Debian-Linux

Step 3) Update Package Repository

Debian repositories are defined in the /etc/apt/sources.list file and the /etc/apt/sources.list.d/ directory.  We need to replace Debian 10 repositories with Debian 11 repositories.

To achieve this, in the  /etc/apt/sources.list file , we need to replace the buster keyword with bullseye using the sed command as provided.

$ sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list

Thereafter, locate the following debian-security  lines in the  sources.list file:

deb http://security.debian.org/debian-security bullseye/updates main
deb-src http://security.debian.org/debian-security bullseye/updates main

And replace them with following lines:

deb https://deb.debian.org/debian-security bullseye-security main contrib
deb-src https://deb.debian.org/debian-security bullseye-security main contrib

The  sources.list file should finally look as follows:

deb http://deb.debian.org/debian bullseye main
deb-src http://deb.debian.org/debian bullseye main
deb https://deb.debian.org/debian-security bullseye-security main contrib
deb-src https://deb.debian.org/debian-security bullseye-security main contrib
deb http://deb.debian.org/debian bullseye-updates main
deb-src http://deb.debian.org/debian bullseye-updates main
deb http://deb.debian.org/debian bullseye-backports main
deb-src http://deb.debian.org/debian bullseye-backports main

Updated-Sources-List-Debian10

After modifying the sources.list file, update the package lists to let your system aware of the new repositories.

$ sudo apt update

Step 4)  Perform minimal system upgrade

Performing a full system upgrade will remove numerous packages that you might want to keep – and this is not recommended. As a workaround, the developers have recommended a two-stage upgrade process that will gracefully upgrade Debian Buster to Debian Bullseye. We have the minimal upgrade process which is soon followed by the full-upgrade.

The minimal upgrade upgrades all the existing packages without installing new ones or purging the existing ones. To perform the minimal upgrade, run the command:

$ sudo apt upgrade --without-new-pkgs

Upgrade-without-new-packages-Debian

During the upgrade process, a pop-up prompt will appear requesting you to restart system services when certain libraries such as libpam and libc are upgraded. Select ‘Yes’ and press ENTER.

Restart-Libpam-Services-Debian

Step 5) Perform full upgrade to Debian 11

This is the last step and the most crucial part of the upgrade. The full upgrade upgrades the entire Debain 10 system to Debian 11. It installs the latest packages that come with Debian 11 and resolves dependency issues. This might take a while depending on your bandwidth.

$ sudo apt full-upgrade

Debian10-full-upgrade

Once again, some additional prompts will appear. For example, you will be asked what you want to do about the chrony.conf file. Here, I chose to keep the local version installed.

Keep-Local-Version-Chrony-During-Debian-Upgrade

For the Openssh-server file, again, I chose to keep the local version installed as well.

Ssh-conf-file-local-version-during-debian-upgrade

Once the upgrade is completed then reboot the system with beneath command,

$ sudo reboot

When you log in, verify the version of Debian you are running

$ cat /etc/os-release
$ cat /etc/debian_version

Your system will now be running Debian 11 Bullseye.

Debian11-OS-Release

$ lsb_release -a

lsb-release-debian11

Conclusion

There you go. We have performed a successful upgrade from Debian 10 Buster to Debian 11 Bullseye. You can now enjoy the latest packages and hardware support that is provided by the latest Debian release. If you encountered any errors along the way, Debian has outlined possible fixes to help you resolved them

5 thoughts on “How to Upgrade Debian 10 (Buster) to Debian 11 (Bullseye)”

  1. Hi James, Upgate works well following your documentation. Performed now on several servers (physical / virtual). One remark if you´re using a KVM Host with bridged networking. You need to add this line to your network config before booting the server (at least in my case):
    bridge_hw eth0 (required for Debian 11 ‘bulleye’)
    (“eth0” needs to be the name of your network interface of course)
    Otherwise the network will not start and your server is not reachable anymore after the reboot
    Kr
    Michael

    Reply

Leave a Reply to Michael Cancel reply