Share your love
How To Upgrade Debian 10 to Debian 11
In this article, we want to teach you How To Upgrade or Update from Debian 10 to Debian 11.
After a little more than two years of development, the eleventh version of the Linux system Debian 11 was released under the code name “Bullseye”.
This is an LTS version for which users will receive support for the next five years.
In this guide, you will learn how to upgrade your Debian 10 buster to the Debian 11 bullseye.
How To Upgrade from Debian 10 to Debian 11
To upgrade your Debian 10 to Debian 11, you need to log in to your server as a root user or a non-root user with sudo privileges. To do this, you can follow our article the Initial Server Setup with Debian 10.
Now follow the steps below to upgrade your Debian buster to Debian bullseye.
Backup your Debian 10 system
First, you need to check your OS Linux version with the command below:
lsb_release -a
Output
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster
Then, you need to note down your Linux kernel version with the following command:
uname -mrs
Also, note down your Debian version:
cat /etc/debian_version
Update Local Packages
First, you need to update and upgrade your Debian 10 with the commands below:
$ sudo apt update
$ sudo apt upgrade
Then, run the command below to perform a major version upgrade of the installed packages and may remove some unnecessary packages:
sudo apt full-upgrade
Now you need to remove the automatically installed dependencies with the command below:
sudo apt --purge autoremove
Update Debian 10 to Debian 11
At this point, you need to edit the APT’s source-list files.
First, copy your all config files with the commands below:
sudo cp -v /etc/apt/sources.list /root/ sudo cp -rv /etc/apt/sources.list.d/ /root/
Then, open the /etc/apt/sources.list file with your favorite text editor, here we use vi:
sudo vi /etc/apt/sources.list
You will see the Debian 10 APT config file:
deb http://deb.debian.org/debian buster main
deb-src http://deb.debian.org/debian buster main
deb http://security.debian.org/debian-security buster/updates main
deb-src http://security.debian.org/debian-security buster/updates main
# buster-updates, previously known as 'volatile'
deb http://deb.debian.org/debian buster-updates main
deb-src http://deb.debian.org/debian buster-updates main
Change the file to the Debian 11 APT config as shown:
deb http://mirrors.linode.com/debian bullseye main
deb-src http://mirrors.linode.com/debian bullseye main
deb http://mirrors.linode.com/debian-security bullseye-security/updates main
deb-src http://mirrors.linode.com/debian-security bullseye-security/updates main
# bullseye-updates, previously known as 'volatile'
deb http://mirrors.linode.com/debian bullseye-updates main
deb-src http://mirrors.linode.com/debian bullseye-updates main
When you are done, save and close the file.
Then, update your local package index again with the following command:
sudo apt update
Then, upgrade your system with the command below:
sudo apt upgrade --without-new-pkgs
You will see the APT listing changes and showing news about package updates. Make sure you read them. and press ‘q’ to exit.
Also, you will see the additional screen that Restarts services during package upgrades without asking. Make sure you choose the “Yes” option.
Next, you need to run the full upgrade system with the command below:
sudo apt full-upgrade
Finally, activate your new Debian 11 kernel by rebooting your system:
sudo systemctl reboot
When you are done, log in to your server and verify your Debian version with the following command:
lsb_release -a
In your output you will see:
Output
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
Conclusion
At this point, you learn to upgrade your Debian 10 to Debian 11 with a few commands.
Hope you enjoy your new Debian 11.
You may be like these articles: