Upgrading Debian 10 buster to Debian 11 bullseye

How to upgrade Debian 10 to 11

* This page contains promotional content

I have written about Debian upgrades several times, but the update procedure differs subtly from version to version, so it ends up being a separate article every time.
This time it is the update procedure from Debian10 (buster) to 11 (bullseye).

Checking

$ cat /etc/debian_version
10.11

Updating packages

$ sudo apt update
$ sudo apt upgrade
$ sudo apt dist-upgrade
$ sudo apt autoremove

Updating the source list (from buster to bullseye)

There are changes, so be careful: it will not go well if you only change sources.list from buster to bullseye the way you used to.

The sources.list (/etc/apt/sources.list) with non-free added and switched to a Japanese mirror site (riken)

deb http://ftp.riken.jp/Linux/debian/debian/ bullseye main non-free
deb-src http://ftp.riken.jp/Linux/debian/debian/ bullseye main non-free
 
deb http://security.debian.org/debian-security bullseye-security main non-free
deb-src http://security.debian.org/debian-security bullseye-security main non-free
 
# buster-updates, previously known as 'volatile'
deb http://ftp.riken.jp/Linux/debian/debian/ bullseye-updates main non-free
deb-src http://ftp.riken.jp/Linux/debian/debian/ bullseye-updates main non-free

Upgrading

$ sudo apt update
$ sudo apt upgrade --without-new-pkgs
$ sudo apt full-upgrade

Once the update completes without trouble, reboot

$ sudo systemctl reboot

Cleanup

$ sudo apt autoremove
$ sudo apt autoclean

Aside

Debian12 (bookworm) is scheduled for release in 2023, but as of now it can be updated just by changing sources.list from bullseye to bookworm.
If you are interested, why not try it at your own risk.

See also