Last year I got a Raspberry Pi 4 and it’s two main purposes so far have been to run Pi Hole and serve as a build server for SFML. I didn’t really notice at the time, that I installed quite an old version of Raspbian and as SFML is finally making the push towards C++17, we’ve ran into an issue, where the GCC package is too old. This I set out to upgrade my distro and just thought to quickly write down the few steps, for my future self as well as other people out there.
Debian Version | Release Date |
---|---|
Debian 8 – Jessie | September 2015 |
Debian 9 – Stretch | August 2017 |
Debian 10 – Buster | June 2019 |
Debian 11 – Bullseye | November 2021 |
Debian 12 – Bookworm | Not yet released (maybe 2023) |
- Pick the wanted Debian / Raspbian version from above
- Edit the
/etc/apt/sources.list
as well as the/etc/apt/source.list.d/raspi.list
- Change the code name label in those files to match the wanted version
- For example:
deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
- For example:
- Then the usual
sudo apt update
/sudo apt upgrade
/sudo apt dist-upgrade
- Sit back and wait, it can take a while 😄