Debian 13 (Trixie) is now stable, and Debian 12 is in LTS-only support. Our new guide covers a production-focused upgrade path to Debian 13, including backups, rolling deployments, and common pitfalls to minimize service disruption.
Debian 13 “Trixie” has been the stable release since August 9, 2025, and Debian 12 “Bookworm” is now oldstable. Its full security support window closed around June 2026, leaving it on LTS-only coverage. If you’re still running Bookworm in production, upgrading is no longer optional; it’s a matter of when. This guide walks through a full 12-to-13 upgrade with a specific focus on minimizing downtime on live, service-critical servers, not just a lab box you can afford to take offline for an afternoon.
What’s New in Debian 13 Trixie (Quick Context)
Debian 13 ships Linux kernel 6.12 LTS, GCC 14.2, Python 3.13, and over 14,100 updated packages, with full support running until roughly August 2028 and LTS extending to 2030. For production servers, the practical takeaway isn’t the flashy features; it’s that the security support clock has reset, and every month spent on Bookworm’s shrinking support window is technical debt you’ll eventually have to pay down anyway.
Important Constraint: You Can Only Upgrade From Debian 12
Debian only supports upgrading between consecutive stable releases. If you’re on Debian 11 “Bullseye” or older, you must upgrade to Debian 12 first, then to Debian 13; there’s no direct 11-to-13 path.
The “No Downtime” Strategy: What This Actually Means
Be realistic about what “without downtime” means for a major OS upgrade: the goal isn’t zero risk; it’s minimizing user-facing service interruption through preparation, sequencing, and a tested rollback path. The core techniques that make this achievable:
- Test in staging first, never run your first Trixie upgrade on a production box
- Take a snapshot or full backup immediately before the upgrade, so rollback is a restore, not a rebuild
- Use apt upgrade –without-new-pkgs before full-upgrade to reduce the risk of mid-upgrade service breakage
- Drain traffic from the server first if it’s part of a load-balanced fleet, rather than upgrading it live
- Upgrade one node at a time across a fleet, verifying each before moving to the next
How to Upgrade Debian 12 to Debian 13 (Trixie) Without Downtime
To upgrade Debian 12 to Debian 13 (Trixie) without downtime, first fully patch and reboot your Debian 12 system, back up /etc and your package selections, and disable any third-party repositories that may not yet support Trixie. Then point your APT sources from bookworm to trixie using sudo sed -i ‘s/bookworm/trixie/g’ /etc/apt/sources.list, run sudo apt update, and perform the upgrade in two stages: sudo apt upgrade –without-new-pkgs -y first to safely resolve dependencies, followed by sudo apt full-upgrade -y to complete the transition.
If the server is part of a load-balanced fleet, drain its traffic before starting and re-add it only after verifying all services are healthy post-reboot. This rolling, one-node-at-a-time approach is what actually eliminates user-facing downtime across a production environment.
Step 1: Back Up Everything Before You Touch Anything
This is non-negotiable. A dist-upgrade preserves data and configuration in the vast majority of cases, but “in the vast majority of cases” is not a guarantee; your backup is your actual rollback plan if something breaks mid-upgrade.
sudo tar -czf /backup/etc-backup-$(date +%Y%m%d).tar.gz /etc
sudo dpkg --get-selections > /backup/package-selections-$(date +%Y%m%d).txt
If you’re on a VM, take a full snapshot through your hosting provider or hypervisor; this is faster to restore from than a manual file backup and covers everything, not just /etc.
Step 2: Fully Patch Debian 12 Before Upgrading
Never jump to Trixie from a partially updated Bookworm system. Bring the current OS fully current first:
sudo apt update
sudo apt full-upgrade -y

Reboot to ensure the current kernel is fully applied and no pending changes are left hanging before you introduce the bigger upgrade.
sudo apt autoremove -y
sudo reboot

Step 3: Check for Held or Locked Packages
Held packages can silently break a major upgrade. Check for any before proceeding:
apt-mark showhold

If anything critical to the upgrade is listed, remove the hold:
sudo apt-mark unhold <package-name>
Step 4: Verify Free Disk Space
A major version upgrade downloads and temporarily stores a large number of packages. Confirm you have enough headroom, particularly on / and /boot:
df -h

You’ll typically want at least 2–3 GB free on /, and Trixie’s release notes specifically call out ensuring /boot has enough free space, since kernel packages have grown in size.
Step 5: Disable Third-Party Repositories Temporarily
Third-party repos (Docker, Node.js, PostgreSQL, etc.) are one of the most common causes of upgrade failures, since they may not yet have Trixie-compatible packages. Check what’s configured:
cat /etc/apt/sources.list
ls /etc/apt/sources.list.d/

Temporarily disable them by renaming rather than deleting, so you can restore them cleanly afterward:
sudo mv /etc/apt/sources.list.d/docker.list /etc/apt/sources.list.d/docker.list.bak
Step 6: Point Your Repositories to Trixie
The core of the upgrade is simple: swap every bookworm reference to trixie in your APT sources.
sudo sed -i 's/bookworm/trixie/g' /etc/apt/sources.list

If your system uses the newer DEB822 .sources format (common on more recent Debian 12 installs), update those too:
sudo sed -i 's/bookworm/trixie/g' /etc/apt/sources.list.d/*.sources 2>/dev/null

Trixie also officially encourages consolidating to the DEB822 format going forward, but it’s not required for the upgrade to succeed.
Step 7: Refresh Package Metadata
A handful of warnings about changed repository signatures during this step are normal for a major version transition and not a sign of a problem.
sudo apt update

Step 8: Run the Minimal Upgrade First (This Is the Downtime-Reducing Step)
This is the most important step for minimizing service disruption. Instead of jumping straight to a full upgrade, run a minimal upgrade first, one that resolves dependencies without removing or installing new packages:
sudo apt upgrade --without-new-pkgs -y

You’ll likely see “packages have been kept back” messages; this is expected and normal. This step resolves the safer, lower-risk package updates first, reducing the chance of a service getting yanked mid-transaction during the bigger step that follows.
Step 9: Run the Full Upgrade
Once the minimal upgrade completes cleanly, proceed with the full distribution upgrade:
sudo apt full-upgrade -y

This resolves the held-back packages by installing new dependencies or removing conflicting ones. This step takes the longest; don’t interrupt it, especially during kernel or GRUB package installation. If prompted about where to install GRUB, choose the disk your system currently boots from (typically /dev/sda or /dev/vda).
Step 10: Clean Up and Reboot
sudo apt clean
sudo apt autoremove -y
sudo reboot

After rebooting, let’s confirm the upgraded Debian 13.

Step 11: Verify the Upgrade
After reboot, confirm you’re actually running Trixie:
cat /etc/os-release

Or, on systemd-based installs:
hostnamectl

You should see Debian GNU/Linux 13 (Trixie) and 6.12.x kernel versions.
Minimizing Downtime Across a Fleet of Servers
If you’re managing multiple servers behind a load balancer, the real downtime-avoidance strategy happens at the infrastructure level, not just the OS level:
- Remove the server from the load balancer pool before starting the upgrade, so it stops receiving live traffic
- Upgrade and fully verify the drained node using the steps above
- Re-add it to the pool only after confirming all critical services are healthy
- Repeat one node at a time, never upgrading multiple nodes simultaneously
This turns what would otherwise be a single point of downtime into a rolling upgrade with zero visible interruption to end users.
Known Gotchas in Trixie’s Release Notes Worth Knowing
A few changes specifically called out in Debian’s official release notes have tripped up production upgrades:
- /tmp is now mounted as tmpfs by default; applications writing large temporary files may behave differently
- OpenSSH no longer supports DSA keys; audit your key types before upgrading if you rely on SSH automation
- /etc/sysctl.conf is no longer honored directly; move custom kernel parameters to /etc/sysctl.d/
- MariaDB major version upgrades only work reliably after a clean shutdown. Stop the service properly before upgrading if you’re running MariaDB
- Troubleshooting Common Issues
“Unable to locate package” errors during apt update usually mean a third-party repo is still pointing to bookworm. Disable it and retry.
Services fail to start after reboot. Check logs directly:
sudo journalctl -xe
sudo systemctl status <service-name>

Configuration file format changes between major versions are the most common cause.
Need to roll back. If your backup was a VM snapshot, restore it directly. If not, you can attempt to revert sources to bookworm, but a clean rollback via snapshot is far more reliable than trying to downgrade packages manually.
Final Thoughts
Upgrading Debian 12 to Debian 13 without downtime isn’t about finding some special zero-risk trick; it’s about disciplined preparation: full backups before you start, a fully patched source system, third-party repos handled deliberately, the minimal-upgrade-then-full-upgrade sequence, and load balancer draining if you’re managing more than one server.
Follow that order, and the upgrade itself typically takes under an hour per server, with the biggest real risk coming from custom configurations and unmaintained third-party repositories rather than Debian’s own upgrade tooling.
FAQ
Can I upgrade directly from Debian 11 to Debian 13?
No. Debian only supports upgrades between consecutive stable releases, so you must upgrade from Debian 11 “Bullseye” to Debian 12 “Bookworm” first, and only then proceed to Debian 13 “Trixie.”
Will upgrading from Debian 12 to Debian 13 delete my data or configuration?
A standard dist-upgrade preserves data and configuration in the vast majority of cases, since it upgrades packages rather than reinstalling the system. That said, a full backup or VM snapshot is still mandatory beforehand; it’s your rollback plan if anything goes wrong mid-upgrade, not an optional precaution.
Why should I run apt upgrade –without-new-pkgs before apt full-upgrade?
This two-stage approach resolves the safer, lower-risk package updates first without installing or removing anything, reducing the chance of a critical service being disrupted mid-transaction during the larger, more disruptive full upgrade that follows. It’s the key technique for minimizing downtime risk on production servers.
How long does the Debian 12 to Debian 13 upgrade actually take?
For a well-maintained server, the entire process, backup, repository switch, minimal upgrade, full upgrade, and reboot, typically takes under an hour. The biggest variable is the package download speed and how many third-party repositories need to be checked for Trixie compatibility.
What’s the safest way to upgrade multiple production servers without any visible downtime?
Upgrade one server at a time rather than all at once: remove it from your load balancer pool first, complete and verify the upgrade in isolation, then add it back only after confirming services are healthy.
from StarWind Blog https://ift.tt/Puq9xEj
via
IFTTT