Skip to content

Instantly share code, notes, and snippets.

@jauderho
Last active May 6, 2025 18:56
Show Gist options
  • Save jauderho/5f73f16cac28669e56608be14c41006c to your computer and use it in GitHub Desktop.
Save jauderho/5f73f16cac28669e56608be14c41006c to your computer and use it in GitHub Desktop.
HOWTO: Upgrade Raspberry Pi OS from Bookworm to Trixie
### 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 update && sudo apt-get 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
sudo apt update && sudo apt -y full-upgrade && 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
rm /etc/apt/sources.list.d/raspbi.list.bak
@jauderho
Copy link
Author

jauderho commented May 6, 2025

I noticed this warning when doing an update.

# sudo apt-get -y update --audit
Hit:1 http://security.debian.org/debian-security trixie-security InRelease
Hit:2 http://deb.debian.org/debian trixie InRelease                             
Hit:3 http://deb.debian.org/debian trixie-updates InRelease                     
Hit:4 http://archive.raspberrypi.org/debian trixie InRelease                    
Reading package lists... Done
W: http://archive.raspberrypi.org/debian/dists/trixie/InRelease: Policy will reject signature within a year, see --audit for details
A: http://archive.raspberrypi.org/debian/dists/trixie/InRelease: Sub-process /usr/bin/sqv returned an error code (1), error message is:
   Signing key on CF8A1AF502A2AA2D763BAE7E82B129927FA3303E is not bound:
              No binding signature at time 2025-04-25T12:00:23Z
     because: Policy rejected non-revocation signature (PositiveCertification) requiring second pre-image resistance
     because: SHA1 is not considered secure since 2026-02-01T00:00:00Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment