Upgrading Debian 11 bullseye to Debian 12 bookworm

How to upgrade Debian 11 to 12

* This page contains promotional content

I have written about Debian upgrades several times, so this update is almost the same work as the previous Upgrading Debian 10 to 11 .

The only difference is a small change to sources.list when adding non-free.
After main in each repository stanza of /etc/apt/sources.list, add non-free non-free-firmware.

#deb cdrom:[Debian GNU/Linux 12 _Bookworm_ - Official Snapshot amd64 LIVE/INSTALL Binary 20230610-08:51]/ bookworm main non-

deb http://ftp.riken.jp/Linux/debian/debian/ bookworm main non-free non-free-firmware
deb-src http://ftp.riken.jp/Linux/debian/debian/ bookworm main non-free non-free-firmware

deb http://security.debian.org/debian-security bookworm-security main non-free non-free-firmware
deb-src http://security.debian.org/debian-security bookworm-security main non-free non-free-firmware

# bookworm-updates, to get updates before a point release is made;
# see https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://ftp.riken.jp/Linux/debian/debian/ bookworm-updates main non-free non-free-firmware
deb-src http://ftp.riken.jp/Linux/debian/debian/ bookworm-updates main non-free non-free-firmware

As an aside, a direct jump from 10 to 12 failed in my case, so when upgrading from an older release it is safer to go in order (10→11→12).

See also