Introduction
Debian is a free and open-source Linux distribution developed by the community-supported Debian Project. Created in 1993, it is one of the oldest operating systems based on the Linux kernel.
The latest stable version is Debian 11, codenamed Bullseye, released in August 2021 and featuring five years of support. At the time of writing this article, the latest update for Debian 11 is version 11.6.
This tutorial shows how to upgrade from Debian 10 to Debian 11.
Prerequisites
- Debian 10 installed.
- A working network connection.
- A user account with root privileges.
Upgrading Debian 10 to Debian 11
Upgrading the system from Debian 10 to Debian 11 should not disrupt users from using the system, although a reboot is necessary to upgrade the kernel after the upgrade finishes.
Before upgrading, it is strongly recommended to create a backup to prevent data loss in case of an issue during the upgrade.
Follow the steps below to upgrade a Debian 10 system to Debian 11.
Note: Direct upgrades to Debian 11 from Debian releases older than version 10 (Buster) are not supported. Check your Debian version by running:
cat /etc/debian_version
Step 1: Back up Data (Optional)
A full system backup before upgrading is strongly recommended. One of the tools suitable for creating a backup is rsync.
If you don't want to back up everything, the main system contents you should back up are:
- /etc
- /var/lib/dpkg
- /var/lib/apt/extended_states
- output of
dpkg --get-selections "*"
- /var/lib/aptitude/pkgstates if you are using Aptitude to manage packages.
- /home directory and hidden files to prevent some applications from overwriting existing user settings with new defaults.
Note: Not sure whether to create a snapshot or system backup? Learn the difference in our article on snapshots vs. backups.
Step 2: Update Existing Packages and Repositories
Make sure to update all packages before starting the system upgrade. A package in hold status may create an issue during the upgrade procedure.
List all packages in hold status by running:
sudo apt-mark showhold | more
If there are no packages in the output, move on to the next step. If any packages appear in the list, remove the hold status for each package using the following syntax:
sudo apt-mark unhold [package_name]
For [package_name]
, specify the exact package name as it appears on the list.
After removing the hold status for the listed packages, update the system repository and upgrade all packages to the latest version by running:
sudo apt update && sudo apt upgrade
Wait for the process to complete.
Step 3: Install the gcc-8-base Package
The gcc-8-base package contains files common to all languages and libraries contained in the GNU Compiler Collection (GCC). Most systems come with the package preinstalled, but some users have reported that the installation fails if the package is not installed.
Ensure the gcc-8-base package is installed by running:
sudo apt install gcc-8-base
If the package is already on the system, the command makes no changes.
Step 4: Update the Sources File with Bullseye Repositories
The etc/apt/sources.list file is the main apt sources configuration file. Edit the file as a root user to add the Bullseye repositories to the existing sources and reconfigure the file.
Follow the steps below:
1. Change the directory to etc/apt:
cd /etc/apt
2. Open the sources.list file using your preferred text editor. We will use nano:
sudo nano sources.list
3. Remove the existing (buster) sources or disable them by placing a hash sign (#
) at the beginning of the line. Then, paste the new sources in the file:
deb http://deb.debian.org/debian bullseye main contrib non-free
deb http://deb.debian.org/debian bullseye-updates main contrib non-free
deb http://security.debian.org/debian-security bullseye-security main
deb http://ftp.debian.org/debian bullseye-backports main contrib non-free
The file should look similar to this:
4. Save the changes and exit the text editor.
Step 5: Update Repository with New Sources
Run the following command to update the system repository with available Bullseye packages:
sudo apt update
The output states the number of upgradable packages which includes all the Debian 11 packages. Proceed to the next step to upgrade the system.
Step 6: Upgrade System to Debian 11
Run the following command to upgrade the system to Debian 11 (Bullseye):
sudo apt full-upgrade -y
When prompted to restart service packages, select Yes using the arrow keys and press Enter:
Wait for the upgrade process to complete. It may take a while, depending on your network speed and machine configuration.
Step 7: Reboot the System
Reboot the system for the upgrade process to complete and to upgrade the kernel. Run:
systemctl reboot
The system reboots, and the Debian 11 login screen appears:
Step 8: Check System Version
Check the Debian version after upgrading by running:
cat /etc/debian_version
The output states that the system has been upgraded to the latest Debian 11.6 version.
Debian 11 Bullseye Features
Debian 11 comes with more than 11,000 new packages, totaling at almost 60,000 packages in the distribution. Most of the packages have been updated to the latest release, while some packages have been removed since they are no longer officially supported.
The distribution officially supports the following architectures:
- 32-bit (i386) and 64-bit (amd64) machines
- 64-bit ARM (arm64)
- ARM EABI (armel)
- ARMv7 (EABI hard-float ABI, armhf)
- little-endian MIPS (mipsel)
- 64-bit little-endian MIPS (mips64el)
- 64-bit little-endian PowerPC (ppc64el)
- IBM System z (s390x)
In terms of the UI, Debian 11 offers multiple desktop apps and environments, including:
- GNOME 3.38,
- KDE Plasma 5.20
- LXDE 11
- LXQt 0.16
- MATE 1.24
- Xfce 4.16.
The software updates include productivity apps, such as LibreOffice, Calligra, and the latest program language versions, including Perl, Python3, PostgreSQL, PHP, and many others.
The OS now also supports driverless scanning and printing, especially for new devices connected via ethernet, wireless, or USB.
In terms of system resource distribution, the systemd init system in Bullseye relies on using control groups v2, providing a unified resource-control hierarchy. Users can also choose between alternative init systems, such as System-V-style init, OpenRC, and others.
Bullseye is also the first Debian release supporting the exFAT filesystem.
Conclusion
This tutorial showed how to upgrade from Debian 10 (Buster) to Debian 11 (Bullseye). The new version comes with many upgrades, more software tools than the previous version, and a wide selection of desktop environments.
After upgrading to Debian 11, check out how to install phpMyAdmin on Debian 11 and get started with database management, or improve the system's performance by installing the latest Nvidia Debian drivers