-
-
Save jauderho/5f73f16cac28669e56608be14c41006c to your computer and use it in GitHub Desktop.
| ### WARNING: READ CAREFULLY BEFORE ATTEMPTING ### | |
| # | |
| # Officially, this is not recommended. YMMV | |
| # https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/ | |
| # | |
| # This mostly works if you are on 64bit. You are on your own if you are on 32bit or mixed 64/32bit | |
| # | |
| # Credit to anfractuosity and fgimenezm for figuring out additional details for kernels | |
| # | |
| # Make sure everything is up-to-date | |
| sudo apt-get -y update && sudo DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade | |
| # Point to bookworm repos instead | |
| sudo sed -i -e 's/bookworm/trixie/g' /etc/apt/sources.list | |
| sudo sed -i -e 's/bookworm/trixie/g' /etc/apt/sources.list.d/raspi.list | |
| # Contents of /etc/apt/sources.list | |
| deb http://deb.debian.org/debian trixie main contrib non-free non-free-firmware | |
| deb http://security.debian.org/debian-security trixie-security main contrib non-free non-free-firmware | |
| deb http://deb.debian.org/debian trixie-updates main contrib non-free non-free-firmware | |
| # Uncomment deb-src lines below then 'apt-get update' to enable 'apt-get source' | |
| #deb-src http://deb.debian.org/debian trixie main contrib non-free | |
| #deb-src http://security.debian.org/debian-security trixie-security main contrib non-free | |
| #deb-src http://deb.debian.org/debian trixie-updates main contrib non-free | |
| # Contents of /etc/apt/sources.list.d/raspi.list | |
| deb http://archive.raspberrypi.org/debian/ trixie main | |
| # Uncomment line below then 'apt-get update' to enable 'apt-get source' | |
| #deb-src http://archive.raspberrypi.org/debian/ trixie main | |
| # Do actual update. See also https://forums.raspberrypi.com/viewtopic.php?t=389477 | |
| sudo apt update | |
| sudo apt full-upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" --purge --auto-remove rpd-wayland-all+ rpd-x-all+ | |
| sudo apt -y clean && sudo apt -y autoremove | |
| # Reboot | |
| sudo reboot | |
| # Modernize sources | |
| sudo apt modernize-sources | |
| # Make sure the following is in /etc/apt/sources.list.d/raspi.sources. The Signed-by: may be missing | |
| Types: deb | |
| URIs: http://archive.raspberrypi.org/debian/ | |
| Suites: trixie | |
| Components: main | |
| Signed-By: /usr/share/keyrings/raspberrypi-archive-keyring.gpg | |
| # Remove the raspi.list.bak after confirming that everything works | |
| sudo rm /etc/apt/sources.list.d/raspi.list.bak |
@FlavaSava01 had the same issue ChatGPT to the rescue!
This is a file conflict plus a missing tool:
lxpanel 0.11.1-1 wants to install …/lxpanel/plugins/batt.so
You still have lxplug-batt (older Raspberry Pi plugin package) that already owns that file
Also /usr/bin/gdbus is missing (it lives in libglib2.0-bin)
Let’s unblock cleanly. Run these exactly, in order (note the minimal env + GIO_MODULE_DIR so gvfs doesn’t crash GLib while we fix things):
1) Get out of the gvfs/glib crash path
export DEBIAN_FRONTEND=noninteractive
BASE_ENV='env -i PATH=/usr/sbin:/usr/bin:/sbin:/bin GIO_MODULE_DIR=/doesnotexist DEBIAN_FRONTEND=noninteractive'
2) Remove the conflicting legacy plugin
sudo $BASE_ENV dpkg -r --force-depends lxplug-batt
3) Install gdbus (GLib tools)
sudo $BASE_ENV apt-get -y -t trixie install libglib2.0-bin
4) Let apt repair the partially-unpacked state and allow overwrites
sudo $BASE_ENV apt --fix-broken install -y -o Dpkg::Options::="--force-overwrite"
5) Ensure lxpanel finishes installing from the same suite
sudo $BASE_ENV apt-get -y -t trixie install lxpanel
6) Now continue the big upgrade
sudo $BASE_ENV apt-get -o Dpkg::Options::="--force-confnew" -o Dpkg::Options::="--force-overwrite" full-upgrade -y
7) Clean up
sudo $BASE_ENV apt-get autoremove --purge -y
sudo $BASE_ENV apt-get clean
If step 4 still complains about the same file
Force the overwrite in one shot, then continue:
sudo $BASE_ENV apt-get install -y -o Dpkg::Options::="--force-overwrite" lxpanel
sudo $BASE_ENV apt --fix-broken install -y -o Dpkg::Options::="--force-overwrite"
@FlavaSava01 had the same issue ChatGPT to the rescue!
This is a file conflict plus a missing tool:
lxpanel 0.11.1-1 wants to install …/lxpanel/plugins/batt.so
You still have lxplug-batt (older Raspberry Pi plugin package) that already owns that file
Also /usr/bin/gdbus is missing (it lives in libglib2.0-bin)
Let’s unblock cleanly. Run these exactly, in order (note the minimal env + GIO_MODULE_DIR so gvfs doesn’t crash GLib while we fix things):
1) Get out of the gvfs/glib crash path
export DEBIAN_FRONTEND=noninteractive BASE_ENV='env -i PATH=/usr/sbin:/usr/bin:/sbin:/bin GIO_MODULE_DIR=/doesnotexist DEBIAN_FRONTEND=noninteractive'
2) Remove the conflicting legacy plugin
sudo $BASE_ENV dpkg -r --force-depends lxplug-batt
3) Install gdbus (GLib tools)
sudo $BASE_ENV apt-get -y -t trixie install libglib2.0-bin
4) Let apt repair the partially-unpacked state and allow overwrites
sudo $BASE_ENV apt --fix-broken install -y -o Dpkg::Options::="--force-overwrite"
5) Ensure lxpanel finishes installing from the same suite
sudo $BASE_ENV apt-get -y -t trixie install lxpanel
6) Now continue the big upgrade
sudo $BASE_ENV apt-get -o Dpkg::Options::="--force-confnew" -o Dpkg::Options::="--force-overwrite" full-upgrade -y
7) Clean up
sudo $BASE_ENV apt-get autoremove --purge -y sudo $BASE_ENV apt-get clean
If step 4 still complains about the same file
Force the overwrite in one shot, then continue:
sudo $BASE_ENV apt-get install -y -o Dpkg::Options::="--force-overwrite" lxpanel sudo $BASE_ENV apt --fix-broken install -y -o Dpkg::Options::="--force-overwrite"
@haani86 thx, the dpkg command helps. Trixie ist now running in my Pi 4 with KDE on Wayland. Thumps Up!
Here are the instructions from the beta forum (https://forums.raspberrypi.com/viewtopic.php?t=389477):
sudo sed -i 's/bookworm/trixie/g' /etc/apt/sources.list
sudo find /etc/apt/sources.list.d -type f -exec sed -i 's/bookworm/trixie/g' {} \;
sudo apt update
sudo apt purge -y raspberrypi-ui-mods
sudo apt autoremove -y
sudo apt full-upgrade -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" --purge --auto-remove
sudo apt install -y rpd-wayland-all rpd-x-all.
This should be good for 32-bit and 64-bit. Please keep in mind it's not recommended to do an in-place upgrade and that there isn't an official RPI-Trixie image yet for testing.
@UnicornRidingUnicorn Thanks. I've updated with the instructions from the forum post.
After 3 failed attempts with other guides that are based on Debian Desktop, with your tutorial it worked straight away. Pi5 with Trixie and so far everything runs smoothly. Even video playback is smoother in 1080p60 than it was in Bookworm. Thanks for that great guide :)
I went from Buster to Bullseye and then, with the help of your guides, all the way from Bullseye to Bookworm to Trixie, with no issue! Thank you very much!
Make sure to read through known issues: https://www.debian.org/releases/trixie/release-notes/issues.en.html
had the "signature year" prolbme
apt install --reinstall raspberrypi-archive-keyring
solved it.
FYI for future me if I have the same problem.
Did you upgrade the kernel? That would be a starting point. What does „no boot“ mean, any details? Otherwise, roll back by restoring your backup.
I still have 6.12.34+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1 (2025-06-26) this kernel how did you update?
Cam i suggest you to replace init-ramfstools with tiny-initramfs?
I'm the author of piccolinux
@Maverynthia I fixed the signature issue with the following
sudo curl -fsSL https://packages.microsoft.com/keys/microsoft.asc \
| sudo gpg --dearmor -o /etc/apt/keyrings/microsoft.gpg
sudo chmod 644 /etc/apt/keyrings/microsoft.gpg
sudo apt-get update
I just followed your guide on a fresh install with RP4 and everything works fine.
Thanks
Thank you for this guide, it worked for me.
A couple of notes on gistfile1.txt:
- The last line
rm /etc/apt/sources.list.d/raspi.list.bakshould havesudo. - For me on a Raspberry Pi 1, I needed to add
Architectures: armhfto/etc/apt/sources.list.d/raspi.sources&/etc/apt/sources.list.d/raspbian.sourceselse apt complained.
Awesome!
I had an issue with apt and lib nettle during the install: No http request anymore.
/usr/lib/apt/methods/http: error while loading shared libraries: libnettle.so.8: cannot open shared object file: No such file or directory E: Method http has died unexpectedly! E: Sub-process http returned an error code (127) E: Method /usr/lib/apt/methods/http did not start correctly
Fixed by rsync from another computer:
http://ftp.de.debian.org/debian/pool/main/n/nettle/libnettle8t64_3.10.1-1_arm64.deb
And then sudo dpkg -i libnettle8t64_3.10.1-1_arm64.deb
I upgraded and now running "uname -a" gives me:
Linux raspi5 6.12.47+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.47-1+rpt1 (2025-09-16) aarch64 GNU/Linux
How come it's showing Debian instead of Trixie now?
Now with the official announcement (https://www.raspberrypi.com/news/trixie-the-new-version-of-raspberry-pi-os/) out and the linked upgrade topic (https://forums.raspberrypi.com/viewtopic.php?t=392376) I am wondering, which guide has the better (confirmed working, more robust) approach:
- A) This unofficial guide here https://gist.github.com/jauderho/5f73f16cac28669e56608be14c41006c
- B) This official guide https://forums.raspberrypi.com/viewtopic.php?t=392376
Did not fully compare them yet but just wondering related to the differences what's the reason for them.
I jumped on it and used this gist for upgrading from bookworm to trixie. I am running a Pi5 8GB headless (no UI) and am mostly using lots of docker containers.
All went smoothly and so far everything I looked at works just fine (including docker).
Thanks!
Maybe nice to know this is not working with docker and docker-compose. The upgrade will fail.
docker-compose is now part of the docker CLI (accessible as docker compose no dash, no additional package needed). Uninstall docker-compose before the upgrade. You no longer need it. If your upgrade fails you can force uninstall with sudo dpkg --remove --force-remove-reinstreq docker-compose and continue the upgrade process.
Now with the official announcement (https://www.raspberrypi.com/news/trixie-the-new-version-of-raspberry-pi-os/) out and the linked upgrade topic (https://forums.raspberrypi.com/viewtopic.php?t=392376) I am wondering, which guide has the better (confirmed working, more robust) approach:
* A) This unofficial guide here https://gist.github.com/jauderho/5f73f16cac28669e56608be14c41006c * B) This official guide https://forums.raspberrypi.com/viewtopic.php?t=392376Did not fully compare them yet but just wondering related to the differences what's the reason for them.
For me the official guide did not work and I ended up with a missing Desktop Environment. However, following this gist instead worked perfectly!
Anyone try this on lite? Would that just be excluding rpd-wayland-all+ rpd-x-all+
Yup, I did it on headless lite and just skipped the Wayland & X stuff - it worked well.
my RPI 4, broke the book, a lot of modules stop working included the internet, so I had to flash using RPI image, and then lost (I have a backup) all the currenct settings
Thanks again @jauderho perfect upgrade guide. My RPI5 with k3s is now running Raspberry OS Trixie. The entire process took about 15-20 minutes