Updating proxmox container VMs from Debian 12 (Bookworm) to Debian 13 (Trixie)

Why am i writing this?
While Debian is a great distro, upgrading between major versions is a bit of a pain. There’s no real automatic way to do it, and some guides contradict each other a bit. This is how I did it (for one VM) and how I will do it for the rest of them. Probably.

What I started with:

  • Host: Proxmox VE 8.0.4 (yup, will need to update that as well at some point…)
  • VM: Debian 12.1
    • Extra Source: Docker, installed with the official convenience script
    • Extra Source: Zerotier, installed with the official convenience script
    • Free SSD Space: 70GB

Note:

  • I originally set this VM with just the normal Debian install .iso. No proxmox helper scripts were used for this
  • Docker and Zerotier were installed with the one-line copy-paste scripts
  • I did the whole upgrade process directly in the Proxmox WebUI. If you do this via SSH, please use ‘screen’ (duckduckgo is your friend), so the process does not get interrupted when/if SSH disconnects.
  • Did you know: SSH is not installed by default on a minimal Debian install.

How it’s done:

To get the system up-to-date (and in a state to actually upgrade), run:

sudo apt update
sudo apt upgrade
sudo apt dist-upgrade

Reboot.

Now check the current version with

cat /etc/debian_version

It should say 12.13 or above. If it doesn’t, please get your system up-to-date.

Now let’s check for old or conflicting packages, which can be removed:

sudo apt -o APT::Get::Trivial-Only=true full-upgradeCode language: PHP (php)

And remove them. apt does this quite well:

sudo apt autoremove

Next, we’ll check for held and non-standard packages. A package held at an old version might prevent the upgrade. Non-standard packages can come from sources, which don’t have a new repo.

sudo apt-mark showhold

If you never used the apt-mark command, this should return nothing. If it does, see if you absolutely need the held version. If not, un”hold” the packages. (For me, it returned nothing, so I had nothing to do. Please search how to unhold, if there is something!)

sudo apt list '?narrow(?installed, ?not(?origin(Debian)))'Code language: PHP (php)

This returns the list of packages not in Debian repos. For me, this returned several packages related to Docker-CE, and one package for Zerotier.

Now that we have a (mostly) clean, up-to-date base, we need to manually edit the sources files, so Debian knows to now use the new repos!

Start editing the default sources list with the inbuilt command

sudo apt edit-sources

This will ask you which editor to use. I will not explain how to use nano or vim here, there’s tons of resources for that. Select whichever editor you prefer.

Now replace every instance of “bookworm” with “trixie”. And I mean EVERY. Should be a bunch of lines. Save and exit the editor.

Now for the extra sources:

cd /etc/apt/sources.list.d/Code language: PHP (php)

Hop to the sources directory and ls -al to see which sources are installed. for me, it’s two files: “docker.list” and “zerotier.list”. Edit each file and replace “bookworm” with “trixie”.
Note: For docker and zerotier, I explicitly checked if there was a repo available. If you have other sources installed as well, you should probably check them too!

Almost done!
Now we just need to update apts’ lists and do the upgrade in two steps. (Sidenote: I really don’t know why you should do it in two steps, it was recommended in a guide, I did it and everything worked well.1)

sudo apt update
sudo apt upgrade --without-new-pkgsCode language: JavaScript (javascript)
sudo apt full-upgrade

Reboot.

Now, let’s remove all obsolete packages left:

sudo apt list '?obsolete'Code language: PHP (php)
sudo apt purge '?obsolete'Code language: JavaScript (javascript)

This should remove all old, unneeded packages. After a final reboot, you should be good to go!

Anything else?

After the upgrade, Zerotier failed to start properly. A short investigation with

sudo systemctl status zerotier-one.serviceCode language: CSS (css)

revealed that it could not create the tunnel device. This article2 helped in that regard. A

lsmod | grep tun

returned nothing and revealed that – somehow – the upgrade stopped the tunnel device from loading. This can be quickly fixed:

sudo modprobe tun

and to make it persistent

echo "tun" | sudo tee -a /etc/modulesCode language: PHP (php)

After a quick reboot, Zerotier worked as usual.

Other sources:

This “article” is a combination of several others I found and used: 3 4

  1. https://exia.dev/blog/2025-08-16/Complete-Guide-Upgrade-Debian-12-to-Debian-13/# ↩︎
  2. https://gist.github.com/GithubUser5462/5b0e11f67912b094c18bd805ce5db606 ↩︎
  3. https://gist.github.com/yorickdowne/3cecc7b424ce241b173510e36754af47 ↩︎
  4. https://pieterbakker.com/debian-12-to-13-server-upgrade-guide/ ↩︎

This might be what I was actually looking for...

Leave a Reply

Your email address will not be published. Required fields are marked *