Upgrade Debian 12 to Debian 13: Step-by-Step Guide
Upgrade Debian 12 to Debian 13: Step-by-Step Guide
With the release of Debian 13 Trixie in August 2025, system administrators and VPS users get access to a modern Linux kernel, APT 3.0, stronger security defaults, and broader hardware support, including RISC-V. While Debian 12 (Bookworm) is still supported, upgrading ensures long-term stability, better performance, and improved security.
For a complete overview of new features, pros, and cons, read our Debian 13 Trixie review.
If you’re curious about all the new features and pros/cons, check out our detailed Debian 13 review before starting the migration.
Preparing for the Upgrade
Backup and Snapshot
Before touching anything, create a full backup of your VPS.
● On most hosting providers, snapshots can be done directly from the control panel.
● For physical servers, use rsync or tar to back up /etc, /var, and important data directories.
If something breaks during the upgrade, a snapshot lets you roll back in minutes.
Update Current Packages
First, make sure Debian 12 is fully up to date. Run:
sudo apt update
sudo apt upgrade -y
sudo apt full-upgrade -y
sudo apt upgrade -y
sudo apt full-upgrade -y
Remove unused packages:
sudo apt autoremove --purge
Check Repositories and Holds
Disable or remove any third-party repositories in /etc/apt/sources.list and /etc/apt/sources.list.d/.
Check if any packages are on hold:
dpkg --get-selections | grep hold
Clear holds unless they’re absolutely necessary.
Editing Sources.list for Debian 13
Replace references to bookworm (Debian 12) with trixie (Debian 13). For example:
sudo nano /etc/apt/sources.list
Change lines like:
deb http://deb.debian.org/debian bookworm main contrib non-free-firmware
to
deb http://deb.debian.org/debian trixie main contrib non-free-firmware
Do the same for bookworm-updates, bookworm-security, etc. → switch them to trixie-updates, trixie-security.
Running the Upgrade Process
Now it’s time to move forward.
1. Update package lists:
sudo apt update
2. Start with minimal upgrade:
sudo apt upgrade --without-new-pkgs -y
3. Proceed with the full upgrade:
sudo apt full-upgrade -y
This step may take a while depending on your server’s resources and installed software.
Testing and Verification
1. Check Debian version:
lsb_release -a
Expected output:
Distributor ID: Debian
Description: Debian GNU/Linux 13 (trixie)
Description: Debian GNU/Linux 13 (trixie)
2. Confirm services: test your web server, database, SSH access, and scheduled jobs.
3. Update third-party software: re-enable repositories (Docker, Node.js, MariaDB, etc.) with their Debian 13 instructions.
Troubleshooting Common Issues
Broken Packages
If the upgrade halts with dependency errors, try:
sudo apt --fix-broken install
Service Failures After Upgrade
Some services may not restart automatically. Check logs with:
journalctl -xe
and restart manually, for example:
sudo systemctl restart nginx
/tmp on tmpfs
Since Debian 13 mounts /tmp on tmpfs by default, apps relying on persistent temp files may fail. Workaround:
Edit /etc/fstab and configure /tmp back to disk if needed.
Conclusion: Debian 13 on Your VPS
Upgrading from Debian 12 to 13 is straightforward if you follow best practices: back up, update step by step, and test your services after migration. Alternatively, if you prefer to avoid upgrades, you can start with a VPS with Debian 13 pre-installed and save time. With careful preparation, you can upgrade with minimal downtime and keep your infrastructure future-proof.
For most VPS users, Debian 13 brings faster performance, improved security, and a reliable long-term support cycle. With careful preparation, you can upgrade with minimal downtime and keep your infrastructure ready for the future.