482139073

Notes from upgrading Debian 12 to 13

Bookworm to trixie on a small server went smoothly overall. These are the steps, plus the one thing that surprised me.

Before you start

The upgrade

sed -i 's/bookworm/trixie/g' /etc/apt/sources.list /etc/apt/sources.list.d/*
apt update
apt upgrade --without-new-pkgs
apt full-upgrade
reboot

When asked about changed config files, I usually keep my version and then diff against the .dpkg-dist file afterwards.

The surprise: /etc/sysctl.conf

In trixie, /etc/sysctl.conf is no longer read at boot. Settings in it, like net.ipv4.ip_forward=1, silently stop applying after the next reboot. Move them into a drop-in file:

grep -v '^\s*#' /etc/sysctl.conf | grep . > /etc/sysctl.d/99-local.conf
sysctl --system

Check with sysctl net.ipv4.ip_forward after a reboot, not before.

Cleanup

apt autoremove --purge
apt list '~o'    # obsolete packages no longer in any repo