How to Upgrade Raspberry Pi OS to the Latest Version? (2021)


Raspberry Pi OS is based on Debian and follows its versions. The latest Raspberry Pi OS version available for download is currently “Buster”, based on Debian 10.
If you are behind and need to update your Raspberry Pi OS or want to try the next version (“Bullseye” e.g. Debian 11), 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

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 versionCode nameRelease date
Debian 8JessieSeptember 2015
Debian 9StretchAugust 2017
Debian 10BusterJune 2019
Debian 11BullseyeNot yet released, probably in 2021
Debian and Raspberry Pi OS versions

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 Buster.
If you are using an old version, it’s a good idea to update it.

Raspberry Pi OS Bullseye 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.

Updating sources.list

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 :).

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/ buster 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/ bullseye 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:
sudo reboot

That’s it, I’m now up-to-date with bullseye running on my Raspberry Pi 4:

Raspberry Pi Bootcamp
Sale: 10% off today.
Take it to the next level.
I'm here to help you get started on Raspberry Pi.
Learn all the skills you need in the correct order.

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 Bullseye before the official release date, you might have a few bugs, but in general, Debian is pretty stable, even on a development release.


This tutorial doesn't work anymore? Report the issue here, so that I can update it!


Patrick Fromaget

I'm the lead author and owner of RaspberryTips.com. My goal is to help you with your Raspberry Pi problems using detailed guides and tutorials. In real life, I'm a Linux system administrator with a web developer experience.

2 thoughts on “How to Upgrade Raspberry Pi OS to the Latest Version? (2021)

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Posts

Master your Raspberry Pi - 10% off