Upgrade Debian 10 Buster to Debian 11 Bullseye: A Step-by-Step Guide

This step-by-step tutorial will show you how to safely upgrade Debian 10 Buster to Debian 11 Bullseye from the command line.

On August 14th, 2021, the Debian project finally released a stable version of Debian 11 Bullseye after over two years of development. It comes with many new features as most of the software in this version has been updated.

Furthermore, Debian 11 will receive support for the next five years just like any other Debian stable version.

But let’s now focus on how you can upgrade from Debian 10 Buster to Debian 11 Bullseye. The process is simple and assumes you are running in the root account.

1. Backup Your System

Please make sure to back up your data. The Debian upgrades are usually safe, but there is always a chance something may go wrong. Therefore, you must have your valuable data safely copied to a backup location, so you can restore it if there are any problems or complications.

You can manually copy important files to a different device (second hard disk, USB drive, another computer on the network, etc.).

You can also create a complete system image of your current Debian installation with a dedicated system imaging software like CloneZilla. If you wish to use any other backup software, you are free to do so. Just make sure your data are placed in a safe location.

2. Update All Currently Installed Packages

Before upgrading from Debian 10 to Debian 11, it’s important to ensure your currently installed Debian 10 system is up to date. Run the following apt commands in the terminal.

apt update
apt upgrade
apt full-upgrade

Now you can clean any leftover packages.

apt --purge autoremove

Then reboot your Debian 10 for the changes made to apply.

reboot

3. Check the Currently Installed Version

Now we will start by verifying that we are currently using the latest Debian 10.x point release.

The easiest way to check what Debian version you are running is to read the content of the /etc/debian_version file.

cat /etc/debian_version
10.10

An alternative way is by use of the lsb_release command. You can use it to display LSB (Linux Standard Base) information about the Linux distribution.

lsb_release -a
Distributor ID:	Debian
Description:	Debian GNU/Linux 10 (buster)
Release:	10
Codename:	buster

4. Replace Debian 10 with Debian 11 Repositories

The Debian software repositories are defined in the /etc/apt/sources.list file and the /etc/apt/sources.list.d/ directory. Before starting the upgrade procedure, you must reconfigure them to point to the Debian 11 Bullseye repositories.

It is a good practice before updating the software repositories to backup the current software source list first.

mkdir ~/apt
cp /etc/apt/sources.list ~/apt
cp -r /etc/apt/sources.list.d/ ~/apt

Now you can proceed and update the current Debian 10 Buster repository to point to Debian 11 Bullseye repositories.

sed -i 's/buster/bullseye/g' /etc/apt/sources.list
sed -i 's/buster/bullseye/g' /etc/apt/sources.list.d/*

The commands shown above will replace the buster keyword with bullseye in software repositories files.

In Debian 11 Bullseye, the security suite is now named bullseye-security instead of bullseye/updates. So you need to locate the following debian-security  lines in the  /etc/apt/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 these:

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

The final sources.list file should look like the ones below.

cat /etc/apt/sources.list
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

5. Perform a Minimal System Upgrade First

At this point, your Debian 10 system is ready for the upgrade. The next step is to update the repository to let the system recognize the newly added repo URLs.

apt update

In some cases, doing the full upgrade might remove the large number of packages you want to keep. So the Debian developers recommend a two-part upgrade process to avoid the removal of the packages.

  • Part 1: Minimal system upgrade
  • Part 2: Full system upgrade

In the minimal upgrade, you will update and upgrade all the available packages without installing or removing any other packages.

To perform the minimal system upgrade first, run the command shown below.

apt upgrade --without-new-pkgs

Keep an eye on the screen. If the apt-listchanges package is installed, it will show important information about upgraded packages in a pager after downloading the packages.

Press q after reading to exit the pager and continue the upgrade.

Debian 10 to Debian 11 Upgrade

In addition, you will be asked if you want to restart services without asking.

Debian 10 to Debian 11 Upgrade

You will also be asked what you want to do with a specific configuration file. If you’re unsure what to do, go with defaults by pressing Enter key.

6. Upgrade Debian 10 to Debian 11

Once the minimal system upgrade is finished, run the following command to begin the full upgrade.

apt full-upgrade

Do not leave the system unattended because the upgrade process requires various inputs.

You can reboot the system once the Debian 11 upgrade process is completed.

reboot

Log in to the system and check your Debian version.

cat /etc/debian_version
11.0

Or as an alternative way by using the lsb_release command:

lsb_release -a
Distributor ID:	Debian
Description:	Debian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye

Congratulations! You have successfully upgraded your system from Debian 10 Buster to Debian 11 Bullseye. Your system will now be running Debian 11 Bullseye.

7. Cleaning up Debian 10 Obsolete Packages

It is a good idea to clean your newly upgraded Debian 11 Bullseye system by removing old obsolete packages that are now leftover from your successful upgrade and are not needed anymore.

apt --purge autoremove
apt autoclean

Conclusion

The above tutorial taught you how to upgrade Debian 10 Buster to Debian 11 Bullseye. Now you can enjoy the latest packages and hardware support provided by the latest Debian release.

We have tried to make this tutorial as simple as possible. Thanks for using it.

For additional help or useful information, we recommend you to check the official Debian upgrade documentation.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%

24 Comments

    • Hi Rupert,

      Thank you for your remark. This guide has been tested many times and has proven to work flawlessly.

      However a quick check of the official documentation shows that you are correct.
      https://wiki.debian.org/SourcesList

      As a matter of fact, both options work – with and without “/”.

      Anyway, the correction has been added. Thanks.

  1. Worked well and after reboot I’m off and running, again …on this old already some years ago Asus, …running MX Linux with a Debian Bullseye 11 base. .. Still need to sort out the MX Linux repositories for this upgrade. Keys and signatures, perhaps …just a few more …minuets…;-) .. Clearly presented guide, thanks.

  2. This worked very, very smooth. Thanks for the guidance.
    Not this time, but upon upgrading to Buster, I had a problem that others might need to know about. I had separate partitions for /, /home, and /boot. The / partition was big enough for Debian 9 (Stretch, I think) but not for D10 Buster. The attempted upgrade messed up the disk structure. I had to repartition and start over.

  3. It might be safer to use the apt-get command everywhere rather than the apt command. The latter had (maybe still has) the side-effect of doing “apt-get clean” at the end. It may have some other side effects. Please comment.

  4. What a difference a month makes. The upgrade guide from a month before this one required dev mode etc… alot of steps to upgrade. This went very smooth. I performed this upgrade on a Samsung Galaxy Chromebook and am unsure if I have a full version of Bullseye or a limited beta like what the Chromebook originally came with.

  5. I’ve been using Debian since slink, I always reinstall fresh. Your guide worked for me! Except for apt: fails to upgrade guile-2.2-libs from buster to bullseye, but that’s not your fault!

    • If anyone else has this issue run `apt full-upgrade` again…

      5.1.21. Upgrades involving libgc1c2 need two runs

      Packages that depend on libgc1c2 in buster (e.g. guile-2.2-libs) may be held back during the first full upgrade run to bullseye. Doing a second upgrade normally solves the issue. The background of the issue can be found in bug #988963

    • Hi Joseph,

      Unfortunately, such a direct upgrade by skipping a major version (“Buster”) is not possible. Instead, you would have to upgrade from “Stretch” to “Buster” first and then from that to “Bullseye.”

      Best,
      Bobby

Leave a Reply

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