How to upgrade Debian 10 to Debian 11?

This article will show you how to ugprade Debian 10 to Debian 11 through SSH command line.

The process upgrade itself tooks about 10-15 mins total, depends the installation process.

Check OS Debian version first.

cat /etc/debian_version

Now since your Debian version is 10, then let's start to update to latest version first.

apt update
apt upgrade
apt full-upgrade
apt --purge autoremove 

After that reboot the server

reboot

Now let's copy your old repository first.

cp -v /etc/apt/sources.list /root/
cp -rv /etc/apt/sources.list.d/ /root/ 

Now let's edit /etc/apt/sources.list and replace buster to bullseye. The output will be like this. Make sure all words replaced accordingly. You may use any editor such are vim, or nano.

deb http://deb.debian.org/debian/ bullseye main
deb-src http://deb.debian.org/debian/ bullseye main

deb http://deb.debian.org/debian-security bullseye-security main
deb-src http://deb.debian.org/debian-security bullseye-security/updates main

deb http://deb.debian.org/debian/ bullseye-updates main
deb-src http://deb.debian.org/debian/ bullseye-updates main

Now let's start the upgrade process, and follow the instructions.

apt update
apt upgrade --without-new-pkgs 

Now comes to this dialogue, choose No.

Now let's begin full upgrade process.

apt full-upgrade

You may see additional window pop up settings, and choose below.

Next reboot the server.

reboot

Once your server back online, let's verify see if already upgraded to Debian 11.

cat /etc/debian_version
11.9

Once server already showing Debian 11, then the upgrade itself is successful.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.