How to Upgrade Debian 10 Buster to Debian 11 Bullseye
Introduction
Debian is a widely-used operating system that belongs to the Linux family. The new Debian stable version, Debian 11 code named "Bullseye," was launched on August 14, 2021, after more than two years of development, and it will be supported for five years.
This update includes a slew of new packages as well as significant software upgrades. Debian 11 bullseye features a newer version of desktop environments, as well as the Linux 5.10 LTS kernel with support for the exFAT disk.
This tutorial will show you how to upgrade your Debian 10 Buster system to Debian 11, Bullseye, using the command line. We will also address a few FAQs on how to Upgrade Debian 10 Buster to Debian 11 Bullseye.
Prerequisites
The upgrade action must be performed as a superuser. You must be logged in as root or as a user with sudo
rights to use this feature.
Backup Your Data
First and foremost, make a backup of your data before beginning a large operating system upgrade. If you're running Debian in a virtual machine, you should take a full system snapshot, so you can immediately restore your machine if something goes wrong with the upgrade.
Update Currently Installed Packages
Before initiating the release upgrade, it is recommended that you update all of your currently installed packages to the most recent versions.
Packages that have been marked as held back cannot be automatically installed, upgraded, or removed. This could cause problems during the upgrading. Run the following command to see if any packages are being held back on your system:
sudo apt-mark showhold
If there are any packages on hold
, you should either unhold them using sudo apt-mark
unhold package_name
or make sure they won't interfere with the upgrading.
Refresh the packages index and update all installed packages:
sudo apt update
sudo apt upgrade
To execute a major version upgrade of the installed packages and maybe delete any superfluous packages, run apt full-upgrade
:
sudo apt full-upgrade
Remove any packages that were installed automatically but are no longer needed:
sudo apt autoremove
Upgrade Debian 10 Buster to Debian 11 Bullseye
The first step is to change the source-list files in APT.
To do so, open your text editor and replace each instance of stretch in the /etc/apt/sources.list
file with buster and buster/updates
with bullseye-security
. If you have other source-list files in /etc/apt/sources.list.d
, you'll need to update them as well.
/etc/apt/sources.list
is the default file, and it looks like this:
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-security main
deb-src http://security.debian.org/debian-security bullseye-security main
deb http://deb.debian.org/debian bullseye-updates main
deb-src http://deb.debian.org/debian bullseye-updates main
Instead of manually altering the files, you can use the sed command shown below:
sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list
sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list.d/*.list
sudo sed -i 's#/debian-security bullseye/updates# bullseye-security#g' /etc/apt/sources.list
Change the terminal output to English only:
export LC_ALL=C
Once that's done, go ahead and change the packages index:
sudo apt update
If a third-party repository causes errors or warning messages, try to resolve the problem or disable the repository.
To begin the system upgrade, update the installed packages. This will upgrade only those packages that do not require the installation or removal of any other packages:
sudo apt upgrade
You'll be asked if you want the services to be resumed automatically during the update.
Output
Restart services during package upgrades without asking?
Various other options may be asked throughout the upgrading process, such as whether you want to keep an existing configuration file or install the package maintainer's version. Read the information carefully, and type Y
if you haven't made any special changes to the file; otherwise, type N
to maintain the present setup.
The upgrade may take some time, depending on the number of changes and your Internet speed.
Then run apt full-upgrade
to thoroughly upgrade the system, install the latest versions of the packages, and resolve any package dependency changes that have occurred between releases. This command will upgrade all packages that were not upgraded previously.
sudo apt full-upgrade
The command may install new packages while removing outdated and conflicting programs.
After that, clean up the extra packages by:
sudo apt autoremove
Finally, type the below command to activate the updated kernel and reboot your machine.
sudo systemctl reboot
Confirm the Upgrade
Wait a few moments for your system to boot up before logging in.
You can find out what Debian version you have by running the following command:
lsb_release -a
Output
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
You can now use Debian 11 to your heart's content.
FAQs to Upgrade Debian 10 Buster to Debian 11 Bullseye
Is it recommended to backup my data before upgrading?
Yes, it is highly recommended to backup all important data before initiating the upgrade process to avoid any potential data loss.
What are the minimum system requirements for Debian 11 Bullseye?
Debian 11 Bullseye has similar system requirements to Debian 10 Buster. You should have at least a 1 GHz processor, 1 GB of RAM, and 10 GB of free disk space.
Are there any major changes in Debian 11 Bullseye compared to Debian 10 Buster?
Yes, Debian 11 Bullseye introduces several important updates and enhancements, including newer software versions, improved hardware support, and updated security features.
Can I upgrade my system without an internet connection?
To ensure a smooth upgrade, it is recommended to have a reliable internet connection as it will be necessary to download updated packages during the upgrade process.
What happens to packages that are not compatible with Debian 11?
During the upgrade, incompatible packages will either be removed or replaced with updated versions to maintain system stability and compatibility.
How long does the upgrade process take?
The duration of the upgrade process can vary depending on factors such as the speed of your internet connection and the number of packages being upgraded. It is advisable to allocate sufficient time to complete the process uninterrupted.
Can I rollback to Debian 10 Buster after upgrading to Debian 11 Bullseye?
There is no built-in rollback feature on Debian. Once you have upgraded to Debian 11 Bullseye, it is challenging to revert back to Debian 10 Buster without performing a fresh installation.
Conclusion
It's quite simple and painless to upgrade from Debian 10 to Debian 11.
If you run into any problems, go visit the Release Notes for Debian 11 (bullseye) website, which lists all known issues that can occur during a Debian 10 bullseye upgrade.
If you have any queries, please leave a comment below and we’ll be happy to respond to them.