Remotely Updating from Debian 12 Bookworm to Debian 13 Trixie

I’m traveling at the moment but have an idle morning so I’m geeking around and I see Debian 13 Trixie was release a week or so ago. Being a glutton for punishment, I’ve decided to see if I can force my 3D print server to complete the upgrade without needing physical intervention. This would be the second full kernel upgrade that install has seen.

“MacMini” Mid 2011 Mac Mini
CPU Intel Core i5-2415M @ 2.30 GHz
Architecture 2 cores / 4 threads (Sandy Bridge)
RAM 16 GB - 1600Mhz DDR3

Since I repurposed this as a server for my 3D printers, it has run Debian. I initially installed Raspberry Desktop on it so that it was something familiar to me as my initial Linux knowledge was all Raspberry Pi based. Raspberry Desktop has not been updated since 2022 and it’s currently based on Debian 11 (Bullseye). I was running into issues with some things being out of date so I pushed Debian 12 (Bookworm) to it without much fuss and it’s been running fairly well besides stumbling into an issue with upgrading Crowsnest, where camera-streamer was looking to see if I was running a Raspberry Pi. It checked for an old system file, and removing this remnant fixed this issue with no side effect.

Beginning the Process

The first thing I’ve got to do is backup my important things. Since this server is just for Klipper & Mainsail, I simply exported out backups from there and continued on.

Next thing to do was make sure it was fully updated. I ran the following.

sudo apt update
sudo apt upgrade
sudo apt full-upgrade
sudo apt --purge autoremove

Update the APT Sources

The next step is swapping the apt sources. You could do this manually, or you can do it the quick and dirty way. I went quick and dirty, and just checked the files after the fact.

You’ll need to edit /etc/apt/sources.list and any files under /etc/apt/sources.list.d/. Change every occurrence of bookworm to trixie.

sudo sed -i 's/bookworm/trixie/g' /etc/apt/sources.list
sudo sed -i 's/bookworm/trixie/g' /etc/apt/sources.list.d/*.list

Double-check your source files!

And so it begins…

First I updated the package list with apt update and then began upgrades with apt upgrade. That’s when I ran into my first hiccup.

insert screenshot here

This is a DKMS build failing against an old kernel (5.10.0‑34-amd64) that’s still installed on the system. DKMS tries to (re)build the Broadcom “wl” module for every installed kernel; headers for 5.10 aren’t present, so it bombs and blocks dpkg.

So let’s just remove the driver and fix packages…

sudo apt -y purge broadcom-sta-dkms
sudo apt -f install
sudo apt autoremove --purge

That fixed it and let me finish the basic updates. Now it’s time to run the big upgrades. Cross your fingers and pray because I’m doing this as I type…

sudo apt full-upgrade

…. lets see what happens.

First issue doing full-upgrade was this

Errors were encountered while processing:
 /tmp/apt-dpkg-install-c5gq5O/02-libgtk-3-0t64_3.24.49-3_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

This error is coming from a 32‑bit (i386) GTK package that’s part of the Debian 13 t64 transition:
libgtk-3-0t64_…_i386.deb. On Trixie, many libs got new …t64 names. Since I don’t think I need 32-bit anymore, I’ll just nuke it.

# Check if i386 is enabled and what packages are installed
dpkg --print-foreign-architectures
dpkg -l | awk '/:i386/{print $2}'

Nothing in here looked important to me, so I’ll continue on.

# Purge all installed i386 packages
dpkg -l | awk '/:i386/{print $2}' | sudo xargs -r apt -y purge

This failed. Continuing to run into dpkg errors.. but I’m too stupid to try and sort that out so fuck it.

sudo apt -o Dpkg::Options::="--force-overwrite" -f install

This looks like it succesfully fixed the dpkg errors so ran sudo apt update and sudo apt upgrade again. At 60% as I type this…

I ran a few passes of the following until everything resolved…

sudo apt -f install
sudo apt autoremove --purge -y
sudo apt update
sudo apt full-upgrade

I was left with one straggler, dpkg: warning: cannot remove non-foreign architecture 'i386', so I ran the following commands..

sudo dpkg --configure -a
sudo apt -f install || true
sudo apt clean
sudo rm -f /var/cache/apt/archives/*i386.deb

And here were are..

sudo apt update
Hit:1 http://deb.debian.org/debian trixie InRelease
Hit:2 http://deb.debian.org/debian-security trixie-security InRelease
Hit:3 http://deb.debian.org/debian trixie-updates InRelease
Get:4 https://pkgs.tailscale.com/stable/debian trixie InRelease
Hit:5 https://packagecloud.io/dcommander/turbovnc/any any InRelease
Fetched 6,579 B in 1s (7,485 B/s)
All packages are up to date.

I guess all there is left to do is reboot and see if it comes back online.

sudo reboot

Now we wait…

So it took a bit longer than usual to reboot, or at least it felt like it, but it’s back online. It’s up. It’s running. I did this from 300 miles away. I feel like I accomplished something. I know a clean install is the right way to do this, but I like a challenge. Doing things like this is an exercise, letting me learn how to troubleshoot things I wouldn’t typically run into in the day to day.