Debian 13 "trixie" has been the stable release since 9 August 2025, and Debian 12 "bookworm" has been under Long Term Support since July 2026. Upgrading in place is supported and usually uneventful, provided you prepare. This guide follows the official trixie release notes and highlights the changes that matter on servers. Read the release notes yourself as well; they are the authority.
Before you start
Only bookworm can be upgraded to trixie. The release notes state that skipping releases is explicitly not supported. A Debian 11 machine must go to 12 first.
Back up. Besides your data and databases, the release notes name /etc, /var/lib/dpkg, /var/lib/apt/extended_states and the package selection list. If your platform offers snapshots, take one too.
sudo tar czf /root/pre-trixie-$(date +%F).tar.gz /etc /var/lib/dpkg /var/lib/apt/extended_states
dpkg --get-selections '*' > ~/selections-$(date +%F).txtPlan for remote access problems. Run the upgrade inside screen or tmux and have console access ready. The release notes warn that an interrupted upgrade over SSH could leave a system unreachable with older bookworm OpenSSH; they ask for openssh-server 1:9.2p1-2+deb12u7 or later first. A fully updated bookworm already has a newer version.
Step 1: bring bookworm fully up to date
sudo apt update
sudo apt full-upgrade
sudo rebootThen check that the package database is clean and nothing is held:
sudo dpkg --audit
apt-mark showhold
cat /etc/debian_versionThe last command should show 12.x (12.15 is the final bookworm point release).
Step 2: check space and third-party sources
df -h / /boot /var
sudo apt -o APT::Get::Trivial-Only=true full-upgradeIf /boot is a separate partition, the release notes ask for at least 768 MB with about 300 MB free; systems first installed with Debian 10 or older are very likely too small. Disable third-party repositories (PHP, Docker, database vendors) until you have confirmed they publish trixie packages, and remove APT pinning you no longer need.
Step 3: switch APT to trixie
Trixie moves APT to the deb822 .sources format. The release notes recommend replacing /etc/apt/sources.list and any *.list files with a single /etc/apt/sources.list.d/debian.sources. Their example for main plus non-free-firmware is:
Types: deb
URIs: https://deb.debian.org/debian
Suites: trixie trixie-updates
Components: main non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
Types: deb
URIs: https://security.debian.org/debian-security
Suites: trixie-security
Components: main non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpgAdd contrib or non-free if you use them, and remove or comment out the old bookworm entries so APT does not see both releases.
Step 4: upgrade in two stages
sudo apt update
sudo apt upgrade --without-new-pkgs
sudo apt full-upgradeThe minimal stage first avoids a full upgrade removing packages you want to keep. Read every configuration-file prompt: keeping your version is usually right for files you edited, but compare with the new default afterwards. APT logs everything in /var/log/apt/history.log and /var/log/apt/term.log.
Step 5: checks before the reboot
- Network interface names. The release notes list two known cases where trixie names a network interface differently (the
i40edriver, and firmware exposing the ACPI_SUNobject). Before rebooting, runudevadm test-builtin net_setup_link /sys/class/net/<interface>and compareID_NET_NAMEwith the current name. If it differs, pin the name with a systemd.linkfile or fix the network configuration, or the server may come back without network. - Kernel. Make sure a
linux-image-*metapackage such aslinux-image-amd64is installed so the trixie 6.12 kernel is pulled in.
dpkg -l 'linux-image*' | grep ^ii | grep -i meta
sudo rebootAfter the reboot, cat /etc/debian_version should show 13.x and uname -r a 6.12 kernel.
Server changes worth knowing
/tmpis a tmpfs (in memory, up to 50% of RAM by default) after the first reboot. Files left in the old/tmpare hidden. Applications that write large temporary files may needsystemctl edit tmp.mountto set a size, orsystemctl mask tmp.mountto keep the old behaviour./etc/sysctl.confis no longer read. Move kernel tuning into/etc/sysctl.d/*.conffiles.- OpenSSH dropped DSA keys, and
openssh-serverno longer reads~/.pam_environment. - Databases change major version. MariaDB moves from 10.11 to 11.8; the release notes stress stopping it cleanly before the upgrade (
service mariadb stop, then look for "Shutdown complete" in the log). Bookworm's PostgreSQL 15 is replaced by 17; plan the cluster migration (for example withpg_upgradeclusterfrompostgresql-common) and test it. - PHP moves from 8.2 to 8.4. Test applications, extensions and PHP-FPM pool files before upgrading production.
- Dovecot, Samba, libvirt, RabbitMQ and strongSwan all have specific notes in the issues chapter; read them if you run these.
- arm64 cloud VMs with UEFI boot need manual steps described in the release notes.
Step 6: clean up
sudo apt autoremove
sudo apt modernize-sourcesapt modernize-sources converts any remaining one-line source files to the new format. The release notes also suggest reviewing packages that are now obsolete, since security support for them usually ends a year after trixie's release.
What you should do
- Test the upgrade on a copy or a non-critical server first, including your application and databases.
- Take backups (and a snapshot if available), and keep console access ready.
- Follow the order: update bookworm, check, switch sources,
upgrade --without-new-pkgs,full-upgrade, check interface names, reboot. - After the reboot, verify services,
/tmpusage, sysctl settings and logs. - Keep the release notes' issues chapter open during the work; it lists the package-specific traps.
Sources
- debian.org/releases/trixie/release-notes/upgrading.en.html
- debian.org/releases/trixie/release-notes/issues.en.html
- debian.org/releases
- debian.org/News/2026/20260712
- debian.org/News/2026/2026071102
- manpages.debian.org/trixie/postgresql-common/pg_upgradecluster.1.en.html
- manpages.debian.org/trixie/apt/apt.8.en.html
- security-tracker.debian.org/tracker/source-package/mariadb
- security-tracker.debian.org/tracker/source-package/postgresql-17
- security-tracker.debian.org/tracker/source-package/php8.4
Comments
0 total · 0 threads