Upgrading Debian Bookworm to Trixie
A step-by-step guide to upgrading your Debian system from Bookworm to Trixie, ensuring a smooth transition with minimal downtime and data loss.
Upgrading Debian Bookworm to Trixie
Debian Trixie was released on August 9, 2025, and is the 13th stable release of Debian. Like other Debian stable releases, it receives 5 years of support through the Debian and Long Term Support (LTS) projects.
If you are currently running Debian 12 (Bookworm), you can upgrade directly to Debian 13 (Trixie). If you are still using Debian 11 (Bullseye) or an older release, you must first upgrade to Debian 12 (Bookworm) before upgrading to Trixie.
This guide walks through the full upgrade process and helps you avoid common issues.
Step 1: Prepare Your System
Before upgrading your system, make sure it is fully up to date and remove any packages you no longer need. This helps reduce the chance of package conflicts and frees up disk space for the upgrade.
It is recommended to have at least 5 GB of free disk space before you begin.
Important: Always create a backup of your important data before performing a major operating system upgrade. Debian upgrades are usually reliable, but a backup gives you a safe way to recover if something goes wrong.
Note: The commands in this guide require root privileges. The examples are run as the
rootuser, sosudois not included. If you are using a regular user account, addsudoto each command.
Update your system and remove unused packages before continuing.
# Update package lists and install all available updates apt update apt dist-upgrade # Remove cached packages and unused dependencies apt clean apt autoremove
Step 2: Update Your Package Repositories
The next step is to point your APT repositories to the new Debian release.
Update /etc/apt/sources.list by replacing every occurrence of bookworm with trixie. You should also review every third-party repository inside /etc/apt/sources.list.d/.
Third-party repositories are one of the most common causes of upgrade problems. If a repository does not yet support Debian Trixie, temporarily disable it by commenting it out until the upgrade is complete.
# Replace "bookworm" with "trixie" in the main repository file sed -i 's/bookworm/trixie/g' /etc/apt/sources.list # Replace "bookworm" with "trixie" in all additional repository files find /etc/apt/sources.list.d -name "*.list" -exec sed -i 's/bookworm/trixie/g' {} \; # Refresh package lists apt update
Step 3: Upgrade to Debian Trixie
The upgrade process may take some time depending on your internet connection and the number of installed packages.
During the upgrade, Debian may ask how configuration files should be handled. If you have not made custom changes to those files, the default option is usually the safest choice. If you have modified configuration files, review the differences carefully before replacing them.
Start with a minimal upgrade, then perform the full distribution upgrade.
# Perform a minimal upgrade first apt upgrade --without-new-pkgs # Upgrade the entire system apt full-upgrade
Once the upgrade finishes, remove packages that are no longer needed and reboot the system.
# Remove unused packages and clean the package cache apt autoremove apt autoclean # Reboot the system reboot
Step 4: Verify the Upgrade
After the system has restarted, verify that you are running Debian Trixie.
# Display the installed Debian version cat /etc/os-release
The output should look similar to this:
PRETTY_NAME="Debian GNU/Linux 13 (trixie)" NAME="Debian GNU/Linux" VERSION_ID="13" VERSION="13 (trixie)" VERSION_CODENAME=trixie DEBIAN_VERSION_FULL=13.5 ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"
Next, verify that your package database is healthy and that no packages are waiting to be upgraded.
# Refresh package lists apt update # List any remaining available upgrades apt list --upgradable
If the command does not report any unexpected packages, your upgrade is complete.
Step 5: Migrate to the New deb822 Repository Format
Note: This step is optional, but it is recommended.
Debian Trixie introduces the deb822 repository format as the preferred way to manage APT repositories. Instead of converting your repository files by hand, Debian provides a built-in tool that performs the migration safely.
Run the following command:
# Convert repository files to the deb822 format apt modernize-sources
Example output:
The following files need modernizing: - /etc/apt/sources.list - /etc/apt/sources.list.d/docker.list Modernizing will replace .list files with the new .sources format, add Signed-By values where they can be determined automatically, and save the old files into .list.bak files. This command supports the 'signed-by' and 'trusted' options. If you have specified other options inside [] brackets, please transfer them manually to the output files; see sources.list(5) for a mapping. Rewrite 2 sources? [Y/n] y Modernizing /etc/apt/sources.list... - Writing /etc/apt/sources.list.d/debian.sources Modernizing /etc/apt/sources.list.d/docker.list... - Writing /etc/apt/sources.list.d/docker.sources
What apt modernize-sources does:
The migration tool performs several tasks automatically:
- Converts legacy
.listfiles into the newer.sourcesformat. - Adds
Signed-Byentries where they can be detected automatically, which improves repository security. - Creates backup copies of your original
.listfiles before replacing them. - Stores the new repository definitions inside
/etc/apt/sources.list.d/, which makes repository management cleaner and easier.
After the migration is complete, refresh the package lists one final time.
apt update
Your system is now running Debian 13 (Trixie) with the recommended repository format and should be ready for regular updates.