How to Upgrade Debian 12 to Debian 13 Trixie

Debian 13, codenamed “Trixie”, was released on August 9, 2025. It ships with Linux kernel 6.12 LTS, GNOME 48, KDE Plasma 6.3, GCC 14.2, Python 3.13, and over 14,100 new packages. Debian 13 will receive full support until August 2028, with Long Term Support (LTS) extending to June 2030. For a comparison with Ubuntu 26.04 LTS, see our Debian vs Ubuntu Server guide.
Regular security support for Debian 12 ended on July 11, 2026. Bookworm now receives security updates only from the Debian LTS team, until June 30, 2028.
This guide walks you through upgrading Debian 12 “Bookworm” to Debian 13 “Trixie” via the command line.
Prerequisites
You need to be logged in as root or a user with sudo privileges to perform the upgrade. You can only upgrade to Debian 13 from Debian 12. If you are running an older Debian version, upgrade to Debian 12 first .
Debian 13 no longer supports 32-bit PC systems. There is no official i386 kernel or installer, and Debian advises against upgrading these systems to Trixie. To check the architecture of your system, run:
dpkg --print-architectureIf the command prints i386, do not upgrade. Reinstall the system as amd64 if the hardware supports it.
If you are upgrading a remote server over SSH, run the upgrade inside a tmux or screen session. If the connection drops, the upgrade keeps running, and you can reattach to the session. It also helps to have access to your provider’s web console in case the server does not come back after the reboot.
Back Up Your Data
Before starting a major version upgrade, make sure you have a complete backup of your data. If you are running Debian on a virtual machine, take a full system snapshot so you can restore quickly if anything goes wrong.
Update Currently Installed Packages
Before changing the source repositories, bring your existing Debian 12 system fully up to date.
Check whether any packages are marked as held back, which could interfere with the upgrade:
sudo apt-mark showholdIf there are held packages, either unhold them with sudo apt-mark unhold package_name or make sure they will not cause issues during the upgrade.
Refresh the package index and upgrade all installed packages:
sudo apt update
sudo apt upgradePerform a major version upgrade of the installed packages:
sudo apt full-upgradeRemove automatically installed dependencies that are no longer needed:
sudo apt autoremoveUpdate the Sources List
The upgrade works by pointing your APT repositories from bookworm to trixie.
Debian 12 keeps the Debian repository entries in one of two places. Systems installed with the Debian installer usually have them in /etc/apt/sources.list, one entry per line. Cloud images and many VPS templates use the deb822 format in /etc/apt/sources.list.d/debian.sources. On those systems, /etc/apt/sources.list contains only a comment.
To find every file that still refers to Bookworm, run:
grep -rn bookworm /etc/apt/sources.list /etc/apt/sources.list.d/On a Debian 12 cloud image, the output will look something like this:
/etc/apt/sources.list.d/debian.sources:3:Suites: bookworm bookworm-updates bookworm-backports
/etc/apt/sources.list.d/debian.sources:9:Suites: bookworm-securityEach line shows the file name, the line number, and the matching entry. In this example, all Debian entries are in debian.sources.
bookworm-backports entries from your sources files before upgrading. In sources.list, delete or comment out the backports line. In a .sources file, remove bookworm-backports from the Suites: line. Remove any bookworm-proposed-updates entries as well. You can add trixie-backports after the upgrade is complete.If your Debian entries are in /etc/apt/sources.list, open the file with your text editor
and replace every instance of bookworm with trixie. You can also do this with a single sed
command:
sudo sed -i 's/bookworm/trixie/g' /etc/apt/sources.listAfter editing, your /etc/apt/sources.list should look similar to this:
deb https://deb.debian.org/debian/ trixie main contrib non-free non-free-firmware
# deb-src https://deb.debian.org/debian/ trixie main contrib non-free non-free-firmware
deb https://deb.debian.org/debian/ trixie-updates main contrib non-free non-free-firmware
# deb-src https://deb.debian.org/debian/ trixie-updates main contrib non-free non-free-firmware
deb https://security.debian.org/debian-security/ trixie-security main contrib non-free non-free-firmware
# deb-src https://security.debian.org/debian-security/ trixie-security main contrib non-free non-free-firmwareIf your system uses /etc/apt/sources.list.d/debian.sources, run the same command against that file:
sudo sed -i 's/bookworm/trixie/g' /etc/apt/sources.list.d/debian.sourcesOn a cloud image, the edited file should look similar to this:
Types: deb deb-src
URIs: mirror+file:///etc/apt/mirrors/debian.list
Suites: trixie trixie-updates
Components: main
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
Types: deb deb-src
URIs: mirror+file:///etc/apt/mirrors/debian-security.list
Suites: trixie-security
Components: main
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpgIf you have third-party repository files under /etc/apt/sources.list.d/, disable them before the upgrade. They may not be compatible with Debian 13 and can cause errors.
Run the grep command again when you are done. No Debian entry should still point to bookworm.
You can find a full list of Debian mirror addresses on the official mirrors page .
Upgrade to Debian 13 Trixie
Set the terminal output to English to make it easier to follow any prompts:
export LC_ALL=CUpdate the package index with the new Trixie repositories:
sudo apt updateIf you see errors related to third-party repositories, fix or disable them before continuing.
Before the upgrade starts, make sure you have enough free disk space. The following command plans the full upgrade without installing anything:
sudo apt -o APT::Get::Trivial-Only=true full-upgradeThe summary at the end shows how much APT needs to download and how much disk space the upgrade will use. APT then stops with a Trivial Only specified but this is not a trivial operation error. This is expected. The option tells APT not to make any changes. If the command fails with a different error, run it again after the apt upgrade --without-new-pkgs step below.
If APT reports that there is not enough free space in /var/cache/apt/archives/, run sudo apt clean to delete downloaded package files, or check which filesystem is full
and free up space. If /boot is a separate partition, Debian recommends at least 768 MB in size with about 300 MB free. You can check it with df -h /boot.
Run the initial upgrade. This upgrades packages that do not require installing or removing other packages:
sudo apt upgrade --without-new-pkgsDuring the upgrade, you may be asked whether services should be automatically restarted:
Restart services during package upgrades without asking?You may also see prompts about configuration files. If you have not made custom changes to a file, it is safe to accept the package maintainer’s version. If you have made changes, keep the current version to avoid losing your customizations.
Once the initial upgrade finishes, run the full upgrade. This installs new packages, removes obsolete ones, and resolves any remaining dependency changes between Debian 12 and 13:
sudo apt full-upgradeThe upgrade may take some time depending on the number of packages, your hardware, and your internet speed.
When it completes, clean up packages that are no longer needed:
sudo apt autoremoveBefore rebooting, check whether the upgrade will change your network interface names. On some systems, Debian 13 assigns different names than Debian 12. The known cases are machines with the i40e network driver and machines whose firmware exposes the ACPI _SUN object. systemd 252 in Bookworm ignored that object, and systemd 257 in Trixie uses it for naming. Network configuration that refers to the old name stops working, and a remote server goes offline.
After apt full-upgrade and before rebooting, check whether the systemd change will assign a different name:
udevadm test-builtin net_setup_link /sys/class/net/enp1s0 2>/dev/nullReplace enp1s0 with your interface name. If the ID_NET_NAME value in the output differs from the current name, pin the current name with a systemd.link
file before rebooting. The release notes
describe the issue in more detail.
Reboot your system to load the new kernel:
sudo systemctl rebootVerify the Upgrade
After the system boots, log in and check the Debian version :
lsb_release -aDistributor ID: Debian
Description: Debian GNU/Linux 13 (trixie)
Release: 13
Codename: trixieIf lsb_release is not installed, read the version from /etc/debian_version:
cat /etc/debian_version13.7The number after the dot is the point release. Your system may show a newer one.
You can also verify the kernel version:
uname -rThe output should show a 6.12 kernel with a +deb13 suffix, such as 6.12.116+deb13-amd64.
Cleaning Up After the Upgrade
Some Debian 12 packages have no Trixie version. They stay installed, but they no longer receive updates. To list them, run:
apt list '?obsolete'Review the list before removing anything. Packages from third-party repositories that are still disabled also appear here, along with .deb files you installed manually. If you do not need any of the listed packages, purge them all at once:
sudo apt purge '?obsolete'Otherwise, pass only the names of the packages you want to remove to sudo apt purge. Purging also deletes their configuration files.
If your Debian entries are still in /etc/apt/sources.list, you can convert them to the deb822 format:
sudo apt modernize-sourcesThe command explains what it will change and asks for confirmation. Answer n to see the converted entries without writing them. When you confirm, APT writes the entries to /etc/apt/sources.list.d/debian.sources and keeps the old file as /etc/apt/sources.list.bak.
Troubleshooting
Third-party repository errors during apt update
Disable any third-party sources under /etc/apt/sources.list.d/ before the upgrade. Re-enable them one by one after the upgrade completes, checking that each repository supports Debian 13.
“Packages have been kept back” during upgrade
This is normal during the initial apt upgrade --without-new-pkgs step. The subsequent apt full-upgrade resolves these held-back packages by installing new dependencies or removing conflicting ones.
Services fail to start after reboot
Check the service logs with journalctl -xe and the service status with systemctl status service_name. Configuration file format changes between major versions are a common cause. To find the package maintainer’s versions that dpkg saved next to your configuration files, run sudo find /etc -name '*.dpkg-*' -o -name '*.ucf-*', then compare them with your files.
Network does not come up after reboot
If the server is offline because its network interface name changed, log in through the console and update the network configuration to use the new name.
Cannot log in with a DSA key after the upgrade
OpenSSH in Debian 13 no longer supports DSA keys. To check which key a server accepts, run ssh -v username@server_ip and look for the Server accepts key: line. If it shows a DSA key, generate an Ed25519 key on your local machine and copy it to the server before you upgrade:
ssh-keygen -t ed25519
ssh-copy-id -i ~/.ssh/id_ed25519.pub username@server_ipBefore upgrading, verify that you can log in with the new key. The IdentitiesOnly=yes option limits authentication to the specified identity. Confirm that the Server accepts key: line shows the Ed25519 key; a login that falls back to the server account password does not verify the key:
ssh -v -o IdentitiesOnly=yes -i ~/.ssh/id_ed25519 username@server_ipFor more details, see our guide on generating SSH keys .
Conclusion
Your system is now running Debian 13 Trixie. Re-enable any third-party repositories you disabled, verify that your critical services are running, and consider adding trixie-backports to your sources if you need newer package versions. For a full list of known issues and detailed upgrade notes, see the official Debian 13 release notes
.
Tags
Linuxize Weekly Newsletter
A quick weekly roundup of new tutorials, news, and tips.
About the authors

Dejan Panovski
Dejan Panovski is the founder of Linuxize, an RHCSA-certified Linux system administrator and DevOps engineer based in Skopje, Macedonia. Author of 1000+ Linux tutorials with 20+ years of experience turning complex Linux tasks into clear, reliable guides.
View author page