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
$ sudo apt full-upgrade
$ sudo apt autoremove
This server had a default Debian 10 kernel, so the upgrade went smoothly. Unfortunately, it usually isn't the system itself that breaks during the upgrade, but the services running on it. This time, it was PHP. For whatever reason, the following happened:
- PHP-FPM7.3 service got masked by systemd.
- PHP commands in the command line stopped working.
- Even though Debian 11's PHP version is 7.4, I still only had PHP 7.3 installed, but not working.
Fixed by installing PHP 7.4 from scratch and reinstalling the application depending on it.
No Comments