Skip to main content
To upgrade Debian 12 to Debian 13, first install every bookworm update and reboot. Then change bookworm to trixie in your APT sources, run sudo apt update, a minimal upgrade with sudo apt upgrade --without-new-pkgs, and then sudo apt full-upgrade. Reboot and check with cat /etc/debian_version. Run it inside tmux or screen so a dropped SSH connection doesn’t interrupt it.

Before you start

A release upgrade replaces most of your system’s packages. Take a full backup or snapshot and check you can restore it. On a dedicated server, copy important data off the server first. Have the VNC console ready in case SSH stops working.
  • Connect with SSH as a sudo user or root. Root can leave out sudo.
  • Debian 13 “trixie” was released on 9 August 2025. You can only upgrade from Debian 12; skipping releases isn’t supported. If you are on Debian 11 or older (end of life), upgrade to 12 first or reinstall.
  • Read the official Debian 13 release notes, especially “Issues to be aware of for trixie”.
  • Debian 13 no longer supports 32-bit PCs (i386) as a normal architecture. Check yours with dpkg --print-architecture; it should say amd64 (or arm64).

How to prepare Debian 12

1

Start a tmux session

If SSH drops, reconnect and run tmux attach -t upgrade. See tmux and screen.
2

Install all bookworm updates

This also gets you the OpenSSH update Debian requires before upgrading over SSH (1:9.2p1-2+deb12u7 or later).
3

Check package health

Both should print nothing. Remove holds with sudo apt-mark unhold <package>.
4

Find packages that aren't from Debian

Software from other repositories (Docker, PHP from sury.org, control panels) may need its own trixie repository. Check the vendor supports Debian 13.
5

Back up APT and package state

6

Check disk space

Debian recommends a /boot of at least 768 MB with about 300 MB free, and enough room on / for the downloaded packages.

How to change the APT sources to trixie

1

See where your sources are

2

Write the new Debian sources

Debian 13 recommends the deb822 format in /etc/apt/sources.list.d/debian.sources:
Add contrib non-free to Components if you used them before.
3

Remove the old bookworm lines

Comment out or delete every bookworm entry in /etc/apt/sources.list and other files in /etc/apt/sources.list.d/, including bookworm-backports. To keep your existing one-line format instead, you can replace the release name everywhere:
Check that no source lists both releases: grep -r bookworm /etc/apt/ should print nothing.

How to run the upgrade

1

Refresh the package lists

2

Minimal upgrade

This upgrades what it can without installing or removing packages, which makes the main step smoother.
3

Full upgrade

Read the list of packages to remove before you answer y. When asked about a changed configuration file you edited (for example sshd_config), keep your version unless you need the new one. Press D to see the difference.
4

Reboot

Don’t interrupt the upgrade or reboot while packages are being configured. If full-upgrade stops with “Could not perform immediate configuration”, run sudo apt full-upgrade -o APT::Immediate-Configure=0. If SSH doesn’t come back after the reboot, log in with the VNC console or rescue mode.

How to check it worked

The point release number (13.x) depends on when you upgrade.

What to do after the upgrade

  1. Remove unused packages: sudo apt autoremove.
  2. Remove leftover config files of removed packages after reviewing them: apt list '?config-files', then sudo apt purge '?config-files'.
  3. Convert any remaining one-line sources to the deb822 format: sudo apt modernize-sources.
  4. Re-enable third-party repositories with their trixie versions and run sudo apt update.
  5. Test your websites, databases and apps.

Changes in Debian 13 to know about

  • /tmp is now a tmpfs in memory after reboot, and /tmp and /var/tmp are cleaned regularly. Don’t store large or permanent files there.
  • OpenSSH no longer supports DSA keys. Replace any ssh-dss keys before you upgrade, or you can’t log in with them.

Frequently asked questions

Can I upgrade Debian 11 straight to 13?

No. Upgrade 11 to 12 first, reboot and check everything, then 12 to 13. Debian 11 is end-of-life, so a fresh install of Debian 13 is often simpler.

Should I use apt or apt-get for the upgrade?

The release notes use apt for interactive upgrades. Use apt-get in scripts.

How long does Debian 12 keep getting updates?

Now that Debian 13 is the stable release, Debian 12 is “oldstable” and its regular security support is time-limited, after which Debian LTS covers a subset of packages. Check debian.org/security and wiki.debian.org/LTS for the current end dates, and plan the upgrade well before them.

Is a reinstall better than an upgrade?

For a clean, simple server, an in-place upgrade works well. For a heavily customised server, a fresh Debian 13 install (VPS Panel rebuild) plus restoring your data can be faster to verify. A rebuild erases the disk.

VPS and dedicated server guides

Every server guide in one place.

Upgrade Ubuntu to a new release

The Ubuntu version of this guide.

Fix apt and dnf repository errors

When apt update fails.

Check your Linux version

Confirm the new release.

Schedule and restore backups

Back up before you start.

Checked against the official Release Notes for Debian 13 (trixie), chapter “Upgrades from Debian 12 (bookworm)” on 4 November 2026. A full release upgrade was not run in our test container (Ubuntu 24.04). Steps can differ on systems with third-party repositories.

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to upgrade your hosting? Use code KB20 at checkout for 20% off your first order!

Last Updated: November 2026