Skip to main content

Upgrade Debian 10 to 11 (speedrun)

This is not supposed to be a quide, just a semi-public documentation of an update I performed on one of my servers.

Update and upgrade existing

First update repos and upgrade any pending packages:

$ sudo apt update
$ sudo apt upgrade

I had one pending Nginx update, so I will install it (I have done the same on another server already, so I know the version is safe and doesn't break anything.) After the upgrade, Nginx has been restarted automatically. You can check the current version with sudo nginx -v

Edit sources.list

Go to /etc/apt and edit sources.list (with elevated privileges).

Remove deb-src

I removed lines with deb-src, because I simply don't need them.

Change server location

Decided I wanted to change to a closer Debian mirror, so I replaced the old servers.

Update from new repos

$ sudo apt update

Autoremove some packages

$ sudo apt autoremove

Add bullseye to sources.list

Replace all occurances of buster in /etc/apt/sources.list with bullseye. Don't forget new syntax on debian-security line, which is now bullseye-security

Add Nginx

On this server, I have Nginx repo in /etc/apt/sources.list.d in nginx.list file. Again, replace buster with bullseye.

Update and upgrade fully

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