Note: This guide has been updated in November 2021, to explain how to upgrade RPI OS Bullseye to Bookworm, but you can use the same tips to upgrade Buster to Bullseye, that is now officially the stable version. Keep in mind that the Raspberry Pi Foundation recommends installing Bullseye from scratch, instead of upgrading it like explained in this tutorial.
Raspberry Pi OS is based on Debian and follows its versions. The latest Raspberry Pi OS version available for download is currently “Bullseye”, based on Debian 10.
If you are behind and need to update your Raspberry Pi OS or want to try the next version (“Bookworm” e.g. Debian 12), you are in the right place.
Raspberry Pi OS used package repositories to download new updates for installed software. By using repositories for another version, it’s possible to upgrade to the latest one without losing any data. The URL are set in /etc/apt/sources.list.
In this tutorial, I’ll show you how to upgrade your system by editing the file and installing all of the new packages.
Raspberry Pi OS versions
If you are lost in all these new words and abbreviations, request my free Raspberry Pi glossary here (PDF format)!
Grab your free PDF file with all the commands you need to know on Raspberry Pi!
Before going further, you need to know which version you are currently using, and the new versions available.
As previously mentioned, Raspberry Pi OS is based on Debian and follows the same versions:
|Debian version||Code name||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 released yet, probably in 2023 🙂|
Yes, all of the code names are based on Toy Story characters :).
You can check this guide to determine which version you currently have.
If you have a recent Raspberry Pi model, you also have to use a recent Raspberry Pi OS version. For example, Raspberry Pi 4 doesn’t boot on Stretch and Raspberry Pi 3B+ doesn’t work on Jessie.
During writing, the current stable version is Raspberry Pi OS Bullseye.
If you are using an old version, it’s a good idea to update it.
Raspberry Pi OS Bookworm is not yet considered stable, but the release date is coming soon and repositories for Raspberry Pi OS are already up and running. That’s why you can now update to test it.
Support us: Join the community on Patreon to show your support, get behind-the-scenes content and other awesome perks!
As mentioned in the introduction, we use APT to update all of the packages on the system (either directly or with a graphical tool intermediate). APT checks for new updates available on the repositories and suggests installation.
The easiest way to upgrade your system to a new version is to change the repositories used by APT. But I also have an alternative to upgrading without commands if you are averse to it :).
Before going further, creating a backup of your SD card might be a good idea. If anything is broken after the installation, you’ll still have a way to easily come back to the current state of your system.
From a terminal
So, start by opening a terminal.
You can do this on Desktop, on Raspberry Pi OS Lite or even via an SSH connection, it doesn’t matter.
Here are the steps to follow:
- Open the sources.list file with:
sudo nano /etc/apt/sources.list
- You’ll see one or more lines like this:
deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
- Edit this line and replace the current Debian code name with the one you want to install, for example:
deb http://raspbian.raspberrypi.org/raspbian/ bookworm main contrib non-free rpi
It’s a good idea to update it step-by-step, one version at a time.
- Save and exit this file.
The next step is to make a complete upgrade of your system:
- Update the package lists:
sudo apt update
- Then upgrade everything with:
sudo apt upgrade
- Press “Y” to confirm the installation.
It will start downloading all the packages now.
- Press “q” to exit the apt-listchanges text.
- Depending on the packages you have, you might have to answer a few questions during the installation (overwrite configuration, restart services, etc.).
It will take a while to download and install all the new package (over 1000 in my case).
Once done, it’s a good idea to reboot your system to apply all changes directly:
Sale: 10% off today.
Get the eBook.
Do more with your Raspberry Pi, learn the useful concepts and take the shortcuts.
You miss half of the fun of using a Raspberry Pi if you don’t know anything about Python.
That’s it, I’m now up-to-date with bullseye running on my Raspberry Pi 4:
With a desktop tool
As promised, here is how to do this if you want to avoid the command line.
By default, I don’t think there is a way to do it easily.
The Add / Remove package tool can’t edit the sources file, you can also see the current repositories.
But you can install Synaptic to do it:
- In the main menu, go to Preferences > Add / remove software.
- Type “synaptic” in the search engine.
- Install the package named Synaptic.
- Once done, open it from the same location in the main menu.
- In the top menu, you’ll find an entry “Repositories” under “Settings”:
- Then in the new window, you can see and edit the repositories addresses:
- Click on each enabled repository and replace the distribution name with the one you want to upgrade to.
If your system is old, try to do it with incremental steps (don’t update from Jessie to Bullseye directly for example).
- Click on “OK” to save your changes.
Once done, you can use Synaptic to update all the packages (use the icons in the top bar), or go back to the “Add / remove software” tool if you prefer.
Either way, your system is now up-to-date.
If you are trying Bookworm before the official release date, you might have a few bugs, but in general, Debian is pretty stable, even on a development release.