Upgrade from Debian 10 (Buster) To Debian 11 (Bullseye)

Posted on 131 views

The Debian project has finally released a stable version of Debian 11 bullseye after a period of about 2 years of development. Many thanks to the Debian Security team and the Long Term Support team, this stable version of Debian will be supported for the next 5 years. Bullseye is the codename for Debian 11 coming with over 11294 new packages to count a total of 59551 packages. Most of the software in this distribution has been updated, about 72% of all packages in buster. Debian 11 comes with a lot of new features, among them are:

  • Newer version of desktop environments such as Gnome 3.38, KDE Plasma 5.20, MATE 1.24, Xfce 4.16, LXDE 11, LXQt 0.16 e.t.c
  • Linux Kernel 5.10LTS
  • ExFAT support
  • Package updates
  • Printer and Scanner improvement
  • Supports many architectures such as 32-bit and 64-bit PC, 64-bit ARM, ARMv7, ARM EABI, little-endian MIPS, 64-bit little-endian PowerPC, 64-bit little-endian MIPS, IBM System z e.t.c thus referred to as a universal operating system
  • The below table shows the software updates in Debian 11 Bullseye in comparison to Debian 10 Buster
Package Version in 10 (Buster) Version in 11 (Bullseye)
Apache 2.4.38 2.4.48
BIND DNS Server 9.11 9.16
Dovecot MTA 2.3.4 2.3.13
Emacs 26.1 27.1
Exim default e-mail server 4.92 4.94
GNU Compiler Collection as default compiler 8.3 10.2
GIMP 2.10.8 2.10.22
GnuPG 2.2.12 2.2.20
Inkscape 0.92.4 1.0.2
the GNU C library 2.28 2.31
lighttpd 1.4.53 1.4.59
Linux Kernel image 4.19 series 5.10 series
LLVM/Clang toolchain 6.0.1 and 7.0.1 (default) 9.0.1 and 11.0.1 (default)
MariaDB 10.3 10.5
Nginx 1.14 1.18
OpenJDK 11 11
OpenSSH 7.9p1 8.4p1
Perl 5.28 5.32
PHP 7.3 7.4
Postfix MTA 3.4 3.5
PostgreSQL 11 13
Python 3 3.7.3 3.9.1
Rustic 1.41 (1.34 for armel) 1.48
Samba 4.9 4.13
Vim 8.1 8.2

In this guide, I will be showing you how to upgrade from Debian 10 (Buster) to Debian 11 (Bullseye).

Step 1: Backup your Debian 10 (Buster) System

Before this upgrade, it is crucial that you make a backup of your data and system configurations. For cloud-based VMs one can quickly backup and restore using snapshots.

The most important things you have to backup are contents of /etc/var/lib/dpkg/var/lib/apt/extended_states and the output of dpkg –get-selections “*”

You can use one of the below tools that work best for you to backup data and configurations.

  • Rsync– a commandline utility tool used to backup personal and $ Home directory data
  • Deja Dup– a GUI utility used to backup personal data.
  • Timeshift– a tool used to backup system files and configurations.
  • Restic– a commandline utility toolthat saves multiple revisions of files in an encrypted repository stored on different backends.
  • Rsnapshot– this is a commandline utility tools that creates periodic snapshots for local and remote machines over ssh.
  • Other tools include: Barman, BackupPC, Bup, Lsyncd, Bareos, Bacula, Duplicati, Borg e.t.c

For information on how to use the above tools view this guide on Top 10 Free Backup Software for Linux

After a successful backup, check the OS version:

$ lsb_release -a

Sample Output:

No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 10 (buster)
Release:	10
Codename:	buster

Also, check the Kernel version.

$ uname -mrs
Linux 4.19.0-17-amd64 x86_64

You can also check the Debian version using:

$ cat /etc/debian_version
10.10

Step 2: Update and Upgrade all Currently Installed Packages.

Before we start upgrading from Debian 10 buster to Debian 11 bullseye, ensure that you have updated and upgraded all the existing packages to their latest available versions as illustrated below:

sudo apt update
sudo apt upgrade
sudo apt full-upgrade

Then clean any leftover packages:

sudo apt --purge autoremove

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

sudo reboot

Step 3: Update Software Repositories.

Before we update the software repositories, we need to take a backup of the current software source list.

mkdir ~/apt
sudo cp /etc/apt/sources.list ~/apt
sudo cp -rv /etc/apt/sources.list.d/ ~/apt

Verify if the contents have been copied by viewing the ~/apt directory.

$ ls apt/
sources.list  sources.list.d

Now proceed and update the current repository to point to Debian 11 bullseye repositories.

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

Verify if the sources list has been updated successfully.

$ egrep bullseye /etc/apt/sources.list

Sample Output:

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/updates main
deb-src http://security.debian.org/debian-security bullseye/updates main
# bullseye-updates, previously known as 'volatile'
deb http://deb.debian.org/debian/ bullseye-updates main
deb-src http://deb.debian.org/debian/ bullseye-updates main

Next, we need to update security lines in the APT configuration file.

sudo nano /etc/apt/sources.list

Find the below lines.

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

Replace the above lines with:

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

View the contents of the file:

$ cat /etc/apt/sources.list

Sample Output:

How-To-Upgrade-from-Debian-10-Buster-To-Debian-11-Bullseye-4

Update the repository.

$ sudo apt update
Get:1 http://security.debian.org/debian-security bullseye-security InRelease [44.1 kB]
Hit:2 http://deb.debian.org/debian bullseye InRelease     
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Get:4 http://security.debian.org/debian-security bullseye-security/main Sources [11.8 kB]
Get:5 http://security.debian.org/debian-security bullseye-security/main amd64 Packages [25.8 kB]
Get:6 http://security.debian.org/debian-security bullseye-security/main Translation-en [12.8 kB]
Fetched 94.5 kB in 1s (68.1 kB/s)                           
Reading package lists... Done
Building dependency tree       
Reading state information... Done
1361 packages can be upgraded. Run 'apt list --upgradable' to see them.

Step 4: Perform a Minimal System Upgrade

At times performing a full system upgrade will remove innumerable packages that you want to retain. Therefore Debian Developers recommend this two-part upgrade process to avoid the removal of the packages. This two-part process entails; minimal upgrade and full-upgrade.

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

sudo apt upgrade --without-new-pkgs

Sample Output:

..............
739 upgraded, 0 newly installed, 0 to remove and 622 not upgraded.
Need to get 280 MB of archives.
After this operation, 54.0 MB disk space will be freed.
Do you want to continue? [Y/n] y

Now keep an eye on the screen since there are a few questions you will be required to answer such as: “keep or erase config options”, “Do want to restart a service?” and so on.

When the apt-list changespackage is installed, you will be granted information regarding the updated packages, press Enter to read through, and when done, press q to return to the upgrade process.

How-To-Upgrade-from-Debian-10-Buster-To-Debian-11-Bullseye-7

These prompts are received due to service interruptions on your system. You can choose Yes on the above window so that any necessary restarts will be done automatically for you without asking.

How-To-Upgrade-from-Debian-10-Buster-To-Debian-11-Bullseye-8

Clicking yes, you will see the output:

........
Restarting services possibly affected by the upgrade:

Services restarted successfully.

(Reading database ... 133233 files and directories currently installed.)
Preparing to unpack .../sensible-utils_0.0.14_all.deb ...
Unpacking sensible-utils (0.0.14) over (0.0.12) ...
Preparing to unpack .../libpam-runtime_1.4.0-9_all.deb ...
Unpacking libpam-runtime (1.4.0-9) over (1.3.1-5) ...
Setting up libpam-runtime (1.4.0-9) ...
..............

When done proceed as below.

Install Grub to your system.

How-To-Upgrade-from-Debian-10-Buster-To-Debian-11-Bullseye-10

Step 5: Upgrade from Debian 10 (buster) to Debian 11 (bullseye)

With the minimal upgrade done, now complete the upgrade to Debian 11 bullseye by performing a full upgrade.

sudo apt full-upgrade

Sample Output:

...................
18 upgraded, 233 newly installed, 22 to remove and 0 not upgraded.
Need to get 717 MB of archives.
After this operation, 838 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

Again here, you are required to keep an eye as we did before. You will be asked as in the minimal upgrade.

When the apt –list changes package is installed, it will display information about the upgraded packages, press Enter to read through when done, press q, and proceed with the upgrade

How-To-Upgrade-from-Debian-10-Buster-To-Debian-11-Bullseye-14

Once the upgrade is completed, reboot your system.

sudo reboot

Step 6: Verify Your Debian 11 Installation.

Proceed and check your Debian version.

$ cat /etc/debian_version 
11.0

Alternative use:

$ lsb_release -a

Sample Output:

How-To-Upgrade-from-Debian-10-Buster-To-Debian-11-Bullseye-17

Congrats! We have successfully upgraded our system from Debian 10 buster to Debian 11bullseye.

Then remove the packages no longer required.

sudo apt --purge autoremove
sudo apt autoclean

Verify your installation by opening and running a few installed applications.

Step 7: Restore Your Backup

Once everything works fine, restore the backup you made earlier before upgrading your system.

Install your desired applications and enjoy Debian 11!

That is it! We have concluded our guide on how to upgrade from Debian 10 (Buster) to Debian 11 (Bullseye). I hope this article was of importance to you.

coffee

Gravatar Image
A systems engineer with excellent skills in systems administration, cloud computing, systems deployment, virtualization, containers, and a certified ethical hacker.