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.11Updating packages
$ sudo apt update
$ sudo apt upgrade
$ sudo apt dist-upgrade
$ sudo apt autoremoveUpdating 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-freeUpgrading
$ sudo apt update
$ sudo apt upgrade --without-new-pkgs
$ sudo apt full-upgradeOnce the update completes without trouble, reboot
$ sudo systemctl rebootCleanup
$ sudo apt autoremove
$ sudo apt autocleanAside
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
Hardening a Docker Mail Server on Sakura VPS
Enabling SpamAssassin, ClamAV, Fail2ban, Postgrey and Let's Encrypt in docker-mailserver
Building a Docker Mail Server on a Sakura VPS with a Freenom Domain
MailServer(Postfix+Dovecot) on Docker by VPS
Sending Mail Through Gmail's SMTP Server with msmtp
How to Configure Gmail SMTP in msmtp