top of page
  • Writer's pictureDaniel Eberhorn

🔧Debian 11 Upgrade - Update from Debian 10 to Debian 11🔧

Updated: Mar 31

Image generated by OpenAI's DALL·E

 

Debian, which has long been considered the basis for stable and reliable Linux systems, has released its latest masterpiece: Debian 11 "Bullseye". For those who have been running systems for longer periods of time, now is the time to update existing Debian 10 installations.

Debian 10 will be phased out of Debian LTS support on June 30, 2024 and will therefore no longer receive security updates - from this point onwards an update to Debian 11 is recommended.


In this blog post we will look at the practical aspects and go through the steps to safely upgrade a Debian 10 to Debian 11. From preparing the repositories to updating the repositories to executing the upgrade process, we will discuss each step in detail. We will do this using a "normal" system - if adjustments have been made to your existing system or there are other points to consider, Debian has a dedicated article that highlights all aspects. These should be considered BEFORE upgrading.


Ready? :-)


Before we start the upgrade to Debian 11 "Bullseye", it is important to ensure that our current Debian system is up to date.



Complete upgrade of the existing system

First, let's update the package lists and check what updates are available, but without installing them immediately:

apt-get update

We then upgrade all packages:

apt-get upgrade
apt-get dist-upgrade

These commands will bring your current stable system up to date. The "-y" option would allow the upgrade to be performed non-interactively without having to confirm each time.


As a final step, we should uninstall all packages that are no longer needed:

apt-get autoremove

In order to prepare the system for the next steps, it is recommended to restart the server.

reboot


Adjustment of the repository files

In order to enable the update to Debian 11, the repository sources must be adjusted. This can be done manually in the files or with the following command.

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

Example:

The file /etc/apt/sources.list contains Debian's own repositories - after manual adjustment or the commands above, it should look like this (just an excerpt):


Before:

...
deb https://deb.debian.org/debian buster main
...

After:

...
deb https://deb.debian.org/debian bullseye main
...


Performing the upgrade

First, the customized package sources must be queried.

apt-get update

The two commands that take the most time must then be issued - this may result in queries and comments that need to be answered (depending on the installed packages and the configuration). For example, whether the current configuration should be kept or the new one from the package should be used.


Update existing packages - without installing new packages.

apt-get upgrade --without-new-pkgs

The next step is to start the upgrade.

apt-get full-upgrade

Finally, the system must be restarted one last time.

reboot


Completion

After the reboot, the new version can be validated with the following command.

lsb_release -a

Debian 11 should now appear here.

...
Distributor ID:	Debian
Description:	Debian GNU/Linux 11 (bullseye)
Release:		11
Codename:		bullseye
....

Now the system should be checked for functionality and any necessary adjustments made.

Commenti


bottom of page