How to upgrade from Debian 10 to Debian 11 Bullseye

In this article, I will detail how to upgrade from the last Debian 10 release to Bullseye 11. The process itself is not complicated, it takes place in a regular mode using the built-in tools of the operating system.

What’s new in Debian 11

As is usually the case, the new release will have slightly more packages in the base repositories. Despite the fact that it is periodically cleaned of old packages, new ones are added a little faster. Below is the main changelog:

  • Obviously, the Linux kernel has been updated. This will now be version 5.10.
  • Updated versions of packages for graphical environment and office programs.
  • It’s clear that all the software has been updated. I will not list the version changes. I will only mention some of the most significant changes. The php version in the database will be 7.4, python – 3.9, MariaDB – 10.5, nginx – 1.18.
  • Updated cgroups to v2.
  • Systemd now writes its journal by default using systemd-journald. It’s good that the traditional logs that rsyslog writes have been left behind.
  • There will be no more single disk images with Xfce. There are netinst.iso and DVD-1.iso, not counting the live images.

You can read more about all the innovations in the official announcement. In general, Debian is very cautious about introducing some fundamental innovations. This system can be called conservative. For this, many love her. The installer has not undergone any significant changes for many versions in a row, unlike the same Ubuntu.

Preparing the system for the upgrade

Before upgrading Debian, I recommend checking all backups first. This is if you update the product, which I do not recommend immediately. First, test everything on a copy of the virtual machine in a test environment. After that, go to the working system. I also recommend keeping a list of currently installed packages, just in case:

dpkg --get-selections "*"

Or immediately with versions. May come in handy too.

dpkg -l

First of all, let’s completely update the current system:

apt update && apt upgrade && apt dist-upgrade && apt --purge autoremove

Let’s check the version. Should be the most recent:

lsb_release -a
cat /etc/debian_version

 

Updating the repository file

Now let’s update the repository file /etc/apt/sources.list and change the release from buster to bullseye. The content of this file should become something like this:

deb http://mirror.yandex.ru/debian bullseye main
deb-src http://mirror.yandex.ru/debian bullseye main

deb http://mirror.yandex.ru/debian bullseye-updates main
deb-src http://mirror.yandex.ru/debian bullseye-updates main

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

Please note that the entry format for the security repository has changed. The old entry was in this format:

deb http://security.debian.org/ buster/updates main

 

Upgrade Debian 10 to Debian 11 Bullseye

Now you can start directly upgrading your Debian 10 system to version 11. Before doing this, be sure to make sure you have access to the server console, not just an ssh connection. Usually everything goes fine and one ssh is enough. But if you update prod, it’s better to play it safe. First, let’s update the package list.

Important! Run further commands in the bare console, and not in the terminal of some graphical shell, if you have one installed. During the update process, this terminal will be closed and the update will be interrupted.

apt update

Now let’s make a minimal update that doesn’t require installing new packages or removing old ones. Make sure to run it through screen or tmux. If the connection is broken when connecting via ssh, unpredictable problems with the system’s performance may occur. The update process must be completed successfully.

apt upgrade

Don’t stray too far from the console, as you may be asked leading questions during the upgrade process from Debian 10 to 11. It is enough to choose the default values for everything to go well. First of all, you will need to read the changelog and exit read mode by pressing q.

If everything went well, then run a full update, which will permanently update all packages and resolve any dependencies that have changed between Debian releases.

apt dist-upgrade

After the completion of this command, the update can be considered complete. You need to reboot.

reboot

We are waiting for Debian 11 Bullseye to load and check the version. Everything is fine. The update was successful.

Conclusion

In general, updating Debian from release to release is done routinely and is not a complicated procedure. But this is provided that there are no dependency conflicts and support for various software of the new version. The problems are likely to be elsewhere and are related to the software. The new system receives updated versions of all software. Somewhere the config may change, somewhere the source code of the site does not support working with the new version of php or database.

All this will have to be manually debugged and corrected. So the apparent ease of updating the system itself can be deceiving. Check everything carefully before doing this. Sometimes it can be easier and more reliable to migrate the system to a new version, rather than updating it.

PS: Please read our other Debian-related articles – read more

Advertisement
Previous articleUpgrade Proxmox 6 to Proxmox 7

LEAVE A REPLY

Please enter your comment!
Please enter your name here