- Ensure your system is up-to-date in it’s current release
sudo apt-get update
sudo apt-get upgrade
sudo apt-get full-upgrade- Replace the codename of your release with that of the next release in APT’s package sources:
/etc/apt/sources.list- The files in
/etc/apt/sources.list.d/
As an example:
deb https://deb.debian.org/debian/ buster main
should be replaced with:
deb https://deb.debian.org/debian/ bullseye main
sudo nano /etc/apt/sources.list /etc/apt/sources.list.d/*- Clean and update package lists
sudo apt-get clean
sudo apt-get update- Perform the major release upgrade, removing packages if required
Interrupting this step after downloading has completed is a great way to stress-test your backups.
sudo apt-get upgrade
sudo apt-get full-upgrade- Remove packages that are not required anymore
Be sure to review this list, you may want to keep some of them.
sudo apt-get autoremove- Reboot your server to make the changes effective
sudo reboot- Check the output of
uname -a ; lsb_release -aand you should see info about the upgraded system
This post was heavily inspired by, and borrows liberally from, the Debian Wiki.