My personal website and Gemini capsule
1+++
2title = 'Upgrade DietPi to Debian Trixie'
3date = 2025-08-09
4tags = ['debian', 'dietpi']
5+++
6
7I have DietPi running on an Orange Pi 5 Plus. The services that DietPi runs include: Pihole + local unbound, my private FreshRSS instance, my private Nextcloud instance, Prometheus node-exporter, a Docker container for the Tapo P110 Prometheus exporter, a Docker container for the qBittorrent exporter, and a Docker container for the Ntfy service.
8
9## Attempt 1
10
11On the DietPi website, they mention using a [script](https://github.com/MichaIng/DietPi/issues/7644) to upgrade DietPi from Bookworm to Trixie. I ran the following command:
12
13```shell
14sudo bash -c "$(curl -sSf 'https://raw.githubusercontent.com/MichaIng/DietPi/dev/.meta/dietpi-trixie-upgrade')"
15```
16
17This script is well-designed and well-written. It offers the user a chance to run DietPi-backup before proceeding, which I did. After the backup completed, I followed the menu options to initiate the upgrade process. This ran well until it wanted to upgrade Docker packages, such as `docker-compose-plugin`. The upgrade script downloads a `docker-compose` .deb package and attempts to install it, but it conflicts with the already-installed `docker-compose-plugin` package, and apparently dpkg didn't know how to proceed. This left my DietPi system in a misconfigured and broken state. I was able to run the `dietpi-backup` script to restore the backup that was done prior to running the upgrade script. I then rebooted.
18
19## Attempt 2
20
21On the freshly booted and restored DietPi system, I ran the following command to remove all Docker-related packages before trying the upgrade script again.
22
23```shell
24sudo apt remove docker.io docker-doc docker-compose podman-docker containerd containerd.io runc docker-compose-plugin
25```
26
27I then ran the upgrade script with the same command as above, and it succeeded. I rebooted, then ran the following commands to finalize the upgrade and install Docker again.
28
29```shell
30sudo apt autopurge
31sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
32```
33
34Pihole, FreshRSS, and Nextcloud were migrated seamlessly, the latter two now using updated versions of PHP and MySQL. After running `docker ps`, I noticed my containers are running, and I didn't have to reconstruct or rebuild any of them. Their data is mostly stored under `/mnt/dietpi_userdata/docker-data`, which was left untouched when I removed and reinstalled Docker.
35
36Yay!