How to Upgrade from Debian 10 to Debian 11

[‘

n

For those wishing to upgrade from Debian 10 Buster to Debian 11 Bullseye, the process is very simple but does take a while depending on the connection speed to the Internet. An upgrade the other day took about an hour due to slow download speeds from the Debian US repository, likely because a lot of people are upgrading at the moment.

n

The first step before the upgrade is to back up any important data! While this is often unnecessary, the one time that a backup isn’t made, something will fail and break the system. If a backup/tar file can be made, it is strongly recommended before continuing.

n

Disclaimers out of the way, let’s begin the upgrade process. Personally, recommend that the current system be completely updated before attempting a distribution upgrade but this is likely unnecessary.

n

Updating Debian 10 Linux

n

To completely update the system issue the following command as root or with the ‘sudo‘ utility:

n

# apt updatern# apt upgradern# apt full-upgradern# apt --purge autoremovernORrn$ sudo apt updatern$ sudo apt upgradern$ sudo apt full-upgradern$ sudo apt --purge autoremovern

n

Once updates finish, you need to reboot the system to apply the kernel and other updates:

n

$ sudo systemctl rebootrn

n

Configure APT Sources List

n

Now it is time to do is prepare the system to look at the new repositories for ‘Bullseye‘. Assuming a standard /etc/apt/sources.list file.

n

First, make sure to backup sources.list file and then do changes as shown.

n

$ sudo cp -v /etc/apt/sources.list /root/rn$ sudo nano /etc/apt/sources.listrn

n

Original /etc/apt/sources.list

n

Debian 10 APT Sources List File
Debian 10 APT Sources List File

n

Now replace the original ‘Buster‘ lines with the following lines in the /etc/apt/sources.list file to ‘Bullseye‘ as seen in the below screenshot.

n

deb http://mirrors.linode.com/debian bullseye mainrndeb-src http://mirrors.linode.com/debian bullseye mainrn rndeb http://mirrors.linode.com/debian-security bullseye-security/updates mainrndeb-src http://mirrors.linode.com/debian-security bullseye-security/updates mainrn rn# bullseye-updates, previously known as 'volatile'rndeb http://mirrors.linode.com/debian bullseye-updates mainrndeb-src http://mirrors.linode.com/debian bullseye-updates mainrn

n

Newly modified /etc/apt/sources.list file.

n

Debian 11 APT Sources List File
Debian 11 APT Sources List File

n

Upgrading to Debian 11 from Debian 10

n

The next step now is to refresh the list of packages available for installation.

n

$ sudo apt updatern

n

Update Debian Package List
Update Debian Package List

n

Once the utilities have updated the list of packages, it is time to start the upgrade from Debian 10 to Debian 11 process.

n

$ sudo apt full-upgradern

n

Upgrade from Debian 10 to Debian 11
Upgrade from Debian 10 to Debian 11

n

The Internet connection speed will play a large role in the upgrade as the upgrade will require about a Gigabyte or more of new packages to be downloaded.

n

Depending on the system’s configuration and installed packages there may be some prompts that require user intervention. The installer will allow the services to be restarted as needed if the user chooses.

n

As with the fresh Debian 11 install, it is suggested that the user let the system run the upgrade and periodically check in on it as this process will take some time. When it finishes, simply reboot the machine and enjoy Debian 11 in all of its wonder!.

n

$ sudo systemctl rebootrn

n

After reboot, make sure to verify the upgrade.

n

$ uname -rrn$ lsb_release -arn

n

Check Debian 11 Release Version
Check Debian 11 Release Version

n

That’s all! We have successfully upgraded to Debian 11 Bullseye from Debian 10 Buster.

n

‘]