Upgrading dietpi: from bullseye to bookworm

Am in the process of moving on from bullseye to bookworm and was wondering, if anyone has gone through this process already.

Should dietpi SBC be considered as a normal debian distro and follow the following steps A:

sudo apt update; sudo apt full-upgrade; [REBOOT]

Update sources.lists from bullseye to bookworm and run apt update and upgrade ?



Rerun the dietpi bash script and select bookworm to force dietpi-installer do its thing?

Any suggestions please? Thanks in advance.

We have a pre-alpha (experimental) script to upgrade from Bullseye to Bookworm automatically :wink:


Thanks for wonderful operating system package dietpi. just want to inform you with provided bash file my raspberry pi B-2 immigrate to Bookworm safely from Bullseye. all the software working also fine. I am using Homeassistant, mqtt broker, adguardhome, unbound, samba, proftpd & vaultwarden on it. minor problem arise with my own manual install zigbee2mqtt. In that one folder location need to modify in zigbee2mqtt configuration file. else all smooth sailing to new operating system. unbound now confirmed using 1.17 version.


Thx for sharing, good to know that majority of software migration was working fine.

Adjusted to dev branch and ran the script, come across this when trying to reboot (was the same at the end of running the script):

Failed to set wall message, ignoring: Unit dbus-org.freedesktop.login1.service failed to load properly, please adjust/correct and reload service manager: File exists
Call to Reboot failed: Unit dbus-org.freedesktop.login1.service failed to load properly, please adjust/correct and reload service manager: File exists

Was running DietPi beta on a x86-64 mini-PC based around an intel i3-4010u.
Can I do anything to fix this pls?

Besides the above, Home Assistant (main use of the system) is running fine and even seems somewhat snappier than before!

I see you posted very same question on our GitHub as well https://github.com/MichaIng/DietPi/pull/6103#issuecomment-1507296719

Pls try to avoid double post on different platforms. This is not going to speed up thinks. It will just double our efforts to manage both. Thx for understanding.

Fair point - and wasn’t intentional, apologies.

after the bookworm upgrade my raspberry shows me these warnings while i am updating system, is these warning need to ignored or having some issue

root@rpi:~# apt-get update
Hit:1 https://deb.nodesource.com/node_12.x bullseye InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian bookworm InRelease
Hit:3 https://archive.raspberrypi.org/debian bullseye InRelease
Hit:4 https://repo.mosquitto.org/debian bullseye InRelease
Reading package lists... Done
W: https://deb.nodesource.com/node_12.x/dists/bullseye/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: http://raspbian.raspberrypi.org/raspbian/dists/bookworm/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: https://archive.raspberrypi.org/debian/dists/bullseye/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

find solution & warnings resolved based on following guidelines : ubuntu - W: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details - Stack Overflow

I gave following commands
cd /etc/apt

sudo cp trusted.gpg trusted.gpg.d
after that with apt-get update no those warnings

@MichaIng FYI, maybe you can have a look if this is something to take into account.

The clean solution in your case is this:

apt install raspberrypi-archive-keyring # installs the keyring for archive.raspberrypi.org to /etc/apt/trusted.gpg.d
ln -sf /usr/share/keyrings/raspbian-archive-keyring.gpg /etc/apt/trusted.gpg.d/raspbian-archive-keyring.gpg # link the Raspbian keyring there, sadly not done by the package automatically

This is how we ship new images already since a while. It is just difficult to patch since we do not know which key users may have manually added and still require.

We do not use the Node.js APT repository for a while anymore. It was changed initially since it did not support ARMv8 (64-bit) and now it does not support ARMv6, so when using it, we’d implicitly use different installation methods on different architectures :thinking:. So if you do not depend on Node.js 12 explicitly, you could just reinstall it via dietpi-software reinstall 9, which will pull the very latest Node.js (but as package but as tarball, installed to /usr/local), and then remove the repository and keyring:

rm /etc/apt/sources.list.d/nodesource_nodejs.list
rm -f /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d/trusted.gpg
1 Like


I just upgraded to bookworm. It went incredibly smoothly. Thanks.

Shouldn’t be raspbian-archive-keyring the correct package? raspberrypi-archive-keyring is not available.

raspbian-archive-keyring is for raspbian.raspberrypi.org and “essential”, hence always installed and cannot be removed. raspberrypi-archive-keyring is for archive.raspberrypi.org but not installed OOTB on Raspberry Pi OS, but instead they install the via to /etc/apt/trusted.gpg, at least it was like this the last time I checked. This package should be available if archive.raspberrypi.org is added and apt updated without error:

root@micha:~# apt show raspberrypi-archive-keyring
Package: raspberrypi-archive-keyring
Version: 2021.1.1+rpt1
Priority: important
Section: misc
Maintainer: Serge Schneider <serge@raspberrypi.com>
Installed-Size: 27.6 kB
Download-Size: 7728 B
APT-Manual-Installed: yes
APT-Sources: https://archive.raspberrypi.org/debian bullseye/main armhf Packages
Description: GnuPG archive keys of the Raspberry Pi OS archive
 The Raspberry Pi OS project digitally signs its Release files. This package
 contains the archive keys used for that.
1 Like

Not sure if this is the right place for this post. I upgraded to Bookworm on two platforms and had the following issues

  1. On the FriendlyArm Neo (v7), Squeezebox server failed to install. According to their forums the 8.3 doesn’t have the proper perl version. The upcoming 8.4 supposts bookworm on 32bit. I manually installed 8.4 nightly and it runs well. Here is a link to their post.

  2. On both FriendlyArm M1Plus and Neo3 (RK3328), if the bluetooth is turned on, the upgrade fails. If I turn off the bluetooth, the upgrade completes smoothly. Here is the error log, same on both

Unpacking xautolock (1:2.2-8) over (1:2.2-7) ...
Preparing to unpack .../383-xfonts-base_1%3a1.0.5+nmu1_all.deb ...
Unpacking xfonts-base (1:1.0.5+nmu1) over (1:1.0.5) ...
Preparing to unpack .../384-xfonts-encodings_1%3a1.0.4-2.2_all.deb ...
Unpacking xfonts-encodings (1:1.0.4-2.2) over (1:1.0.4-2.1) ...
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
[FAILED] dietpi-bookworm-upgrade | Unable to continue, dietpi-bookworm-upgrade will now terminate.

Something for @MichaIng to have a look into

The LMS issue is known indeed, also listed in our Wiki. I plan to add warnings to the upgrade script if software is installed which is known to currently be incompatible with Bookworm. Squeezelite works but LMS fails to start as it does not support recent perl.

Can you replicate the Bluetooth issue? The error log misses details but it looks like there might be some space or RAM issue or a file of the Bluetooth firmware package damaged or so. Disabling Bluetooth purges that package, so it cannot cause issues anymore.

Hello guys,
When using the update script on my odroid c2, I’m getting a message regarding my old (3.16.85) kernel. I thought Odroid C2 was ok to upgrade to bookworm regarding kernel?
I’m a bit of a noob, am I stuck to bullseye or can I update the kernel? (dist-upgrade or full-upgrade doesn’t work, so I guess I’m stuck right?)

If I need to open a dedicated topic, please tell me, I’ll delete this message.

It looks like you are running an old image and the system has been running for quite a while. Our current images contain a new kernel. Unfortunately, as far as I know, there is no way to upgrade your system to the new kernel and you would have to reload our current image.

I was afraid of that answer… :face_with_peeking_eye: I’ll try to go from the start when I’ll have physical access to the machine. Thanks! :pray:

Reference code: e717994a-20e2-41e6-8959-94d9addfff3b
I just uploaded an error report. Does this help?