Skip to content

Instantly share code, notes, and snippets.

@bmatthewshea
Last active March 9, 2024 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bmatthewshea/94be9b4d91df5fc7c7f1c2112995c5b9 to your computer and use it in GitHub Desktop.
Save bmatthewshea/94be9b4d91df5fc7c7f1c2112995c5b9 to your computer and use it in GitHub Desktop.
Commands needed to upgrade RPI Raspbian/Debian System

Upgrade "Raspbian" Bullseye to Bookworm

(should work for any upgrade if you update release names)

Prep

sudo apt-get update
sudo apt-get upgrade
sudo apt-get full-upgrade
# Update the 2 individual files yourself, or run this:
sudo sed -i -e 's/bullseye/bookworm/g' /etc/apt/sources.list /etc/apt/sources.list.d/raspi.list
sudo apt-get clean
sudo apt-get update

Upgrade
"Interrupting this step after downloading has completed is an excellent way to stress-test your backups"

sudo apt-get upgrade
sudo apt-get full-upgrade

Cleanup

sudo apt-get autoremove
sudo reboot

Check Version

lsb_release -a

No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm

I have seen many articles that give various commands that do not follow the official way.

This is the proper way and is mostly taken from: https://wiki.debian.org/DebianUpgrade

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