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.
sudo update
Update and upgrade existing
First update repos and upgrade any pending packages:
$ sudo apt update
$ sudo apt upgrade
upgradeI nginxhad 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 pendingrestarted automatically. You can check the current version with sudo nginx -v
Edit sources.list
restartedGo automaticallyto /etc/apt and edit sources.list (with elevated privileges).
remove
Remove deb-src
I removed lines with deb-src, because notI neededsimply don't need them.
Change server location
changingDecided debianI mirrorswanted 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
editOn 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 viapt sources.listupdate
$ sudo apt upgrade --without-new-pkgs
$ sudo reboot
nginx.list taky
update
upgrade without new pkgs