Upgrade Debian to next major release¶
- Debian Administrator's Handbook: Upgrading from One Stable Distribution to the Next
- Debian stable release notes
Start tmux session in case it's a remote session:
Check for free disk space (5G is a safe buffer):
First upgrade all packages in the old release:
apt clean
apt --fix-broken install
apt update -m
dpkg --configure -a
apt install -f
apt full-upgrade
Revisit /etc/apt/sources.list and:
- remove unneeded lines
- Change all URLs to use
http://deb.debian.org/debian/
Export target release name:
Prepare update:
rm /etc/apt/sources.list.d/${TO}.list
sed -i "s/${FROM}/${TO}/" /etc/apt/sources.list /etc/apt/sources.list.d/*
rm /etc/apt/preferences.d/${FROM} # Remove old releases preferences
rm /etc/apt/preferences.d/${TO}.pref # Remove potential down-pinned target release
apt update
apt full-upgrade
reboot
Cleanup:
Release specific notes¶
Trixie¶
- Trixie release notes
- From a quick tutorial:
If you use the mdadm package, as of Aug 22nd 2025, you'll want a workaround to avoid an issue where mdadm is updated before systemd and shows an error that it cannot find systemd. A bug report tracks this.
Additional steps¶
Switch to deb822 format for the sources.list. This will write /etc/apt/sources.list.d/debian.sources and /etc/apt/sources.list.d/debian-backports.sources:
Caveat that trixie-backports might not have a Signed-By on some 3rd-party mirrors. You can fix this by:
sed -i 's|^Signed-By: $|Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg|' \
/etc/apt/sources.list.d/debian-backports.sources
apt update
Issues¶
- Prometheus node-exporter
apt_upgrades_pendingmetric doesn't update to0anymore- See node-exporter.md
Bookworm¶
Deprecated apt key storage¶
W: https://download.docker.com/linux/debian/dists/bookworm/InRelease:
Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg),
see the DEPRECATION section in apt-key(8) for details.
i.e. for docker repo:
W: https://download.docker.com/linux/debian/dists/bookworm/InRelease: Key is stored in legacy trusted.gpg keyring
Fix:
apt-key del 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo tee /etc/apt/trusted.gpg.d/docker.asc
apt update
node-exporter openipmi alerts¶
Somehow some ipmi packages get installed during upgrade, so on non-IPMI servers remove all IPMI packages:
systemd-resolved¶
- No DNS resolution (see ../../systemd/resolved.md)
Fix:
non-free-firmware¶
Apt keeps reminding about the move of non-free firmware to a different location To silence this warning: