Upgrade Debian 12 (Bookworm) to 13 (Trixie)

Veröffentlicht am Published on 发表于 29. August 2025 um at , 0:29

We run several virtual machines with (mostly headless) Debian, so an in-place upgrade is the most sensible way to update to the new Debian 13, codenamed Trixie. Here are the necessary steps. Several upgrades have been successfully completed as described.

Preparations

First, make sure that everything is up to date on Debian 12 “Bookworm.” To do this, execute the following commands one after the other as root:

su

apt update
apt upgrade
apt full-upgrade

apt --purge autoremove
reboot

Update repositories

All entries must be updated from Bookworm to Trixie. To do this, perform the following steps one after the other after the previous restart:

su

sed -i 's/bookworm/trixie/g' /etc/apt/sources.list
find /etc/apt/sources.list.d -name "*.list" -exec sed -i 's/bookworm/trixie/g' {} \;

apt update

Perform upgrade

Now the actual upgrade can be performed:

apt upgrade --without-new-pkgs
apt full-upgrade

apt autoremove
apt autoclean
reboot

View results

After rebooting again, you can use this command to display the release information and see whether the upgrade was successful:

cat /etc/os-release

Leave a Reply

Your email address will not be published. Required fields are marked *