Upgrading Debian 10 Buster to 11 Bullseye

I followed below linked article to upgrade Debian 10 to 11, and it worked well.


I'll add the text below for quick reference or in case the original link goes down.

Prerequisites

The upgrade operation must be run with superuser privileges. You need to be logged in as a root or a user with sudo privileges .

Backup Your Data

First and foremost, make sure you backup your data before starting the major upgrade of your operating system. If you are running Debian on a virtual machine, it is best to take a complete system snapshot so you can quickly restore your machine in case the update goes south.

Update Currently Installed Packages

Before starting the release upgrade, it is recommended to update all your currently installed packages to their latest versions.

Packages marked as held back cannot be automatically installed, upgraded or removed. This may cause issues during the upgrade process. To check whether there are held back packages on your systems run:

sudo apt-mark showhold

If there are on hold packages, you should either unhold the packages with sudo apt-mark unhold package_name or make sure the packages will not interfere with the upgrade process.

Refresh the packages index and upgrade all installed packages:

sudo apt updatesudo apt upgrade

Run apt full-upgrade to perform a major version upgrade of the installed packages and may remove some unnecessary packages:

sudo apt full-upgrade

Remove the automatically installed dependencies that are no longer needed by any package:

sudo apt autoremove

Upgrade Debian 10 Buster to Debian 11 Bullseye

The first step is to reconfigure APT's source-list files.

To do so, you can either open the /etc/apt/sources.list file with your text editor and replace each instance of stretch with buster and buster/updates to bullseye-security. If you have other source-list files under /etc/apt/sources.list.d, you must update those sources too.

The default file /etc/apt/sources.list looks like this:

/etc/apt/sources.list
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

Alternatively, instead of manualy editing the files you can use the use the sed commands 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

Set the terminal output to English only:

export LC_ALL=C 

Once done, update the packages index:

sudo apt update

If there are any errors or warning messages related to a third-party repository, try fixing the issue or disabling the repository.

Start the system upgrade by upgrading the installed packages. This will upgrade only those packages that don't require any other packages to be installed or removed:

sudo apt upgrade

You will be asked whether you want the services to be automatically restarted during the upgrade.

Restart services during package upgrades without asking?    

During the upgrade process, you may also be asked various other questions, like whether you want to keep an existing configuration file or to install the package maintainer's version. Read the information carefully, and if you didn't make any custom changes to the file, it is safe to type Y; otherwise, to keep the current configuration, enter N.

The upgrade may take some time, depending on the number of updates and your Internet speed.

Next, execute apt full-upgrade, which will perform a complete upgrade of the system, install the newest versions of the packages, and resolve the dependency changes between packages in different releases. This will upgrade all packages that were not upgraded with the previous command.

sudo apt full-upgrade

The command may install some new packages and remove conflicting and obsolete packages.

Once done, clean up the unnecessary packages with:

sudo apt autoremove

Finally, reboot your machine so that the new kernel is activated by typing:

sudo systemctl reboot

Confirm the Upgrade

Wait for a few moments until your system boots up and log in.

You can check the Debian version by using the following command:

lsb_release -a
No LSB modules are available. 
Distributor ID:	Debian 
Description:	Debian GNU/Linux 11 (bullseye) 
Release:	11 
Codename:	bullseye  
 
That's it. You can now enjoy your new Debian 11.

Comments

Popular posts from this blog

Morning Quotes

QCalendarWidget CSS Stylesheeting

Selecting new phone plan