Raspberry Pi is a cute, single-board computer small enough to fit in your hand yet powerful enough to execute various tasks. In fact, it’s become one of the world’s best-selling computers. It has many uses, from building robot prototypes to learning how to program.
At the time of writing, the latest Pi OS version available for download is “Bullseye.” However, if you need to catch up or want to install the next version up from Bullseye – “Bookworm,” then read on for the easiest method to use, plus how to update the firmware only.
Raspberry Pi OS Versions
First, verify which Pi OS version you’re currently using, and which versions are available:
Debian Version Debian Name Available Date
8 Jessie Sept 2015
9 Stretch Aug 2017
10 Buster Jun 2019
11 Bullseye Nov 2021
12 Bookworm Probably sometime in 2023
Yep – that’s right, all characters from Toy Story.
The easiest way to find information about the Raspberry Pi OS version you’re currently using is by entering the following command in the Terminal:
Your operating system name and version will now be displayed.
Updating Pi’s sources.list
Raspberry Pi OS uses “APT” to download new software updates. It checks for them on the packages and recommends installation. So the simplest method to upgrade Raspberry Pi to the most recent version is by changing the packages used by APT.
Before we start, consider backing up your SD card so that you can return to the most recent version should anything break.
The following steps can be carried out via your desktop, using Raspberry Pi OS Lite or an SSH connection.
Open “Terminal” and run the following command to open the sources.list file:
sudo nano /etc/apt/sources.list
You’ll either see one line or several lines of code similar to this:
deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
Next, edit the code by changing the Debian name to the version you wish to upgrade to, for example:
deb http://raspbian.raspberrypi.org/raspbian/ bookworm main contrib non-free rpi
Now “Save” then “Exit” the file.
Next, we’ll carry out a complete upgrade of the system.
Update Pi’s Package List
Run the following command to update the package list:
sudo apt update
If you receive errors, try using a different mirror. You can run a complete upgrade on any available package once the package is updated.
Next, run the following command on your Pi to update available packages:
sudo apt full-upgrade
You’ll be asked if you’d like to continue the update. To continue, type “y” and then hit the “Enter” key. The apt package manager will start to download all the packages and include any additional dependency software required after a full update.
Hit the “q” key to exit the “apt-listchanges” information.
It may take some time to download and install all the latest packages. If the Pi’s kernel and other specific packages were updated, you would need to restart your device before the changes take effect.
Enter this command to restart Raspberry Pi:
Next, follow these steps to achieve the same if you wish to avoid entering commands:
Update Using a Desktop Tool
This method involves installing “Synaptic” and allows you to edit the source file and view the current repositories. Follow these Windows-based steps to update the OS without using commands:
- From the main menu, select “Settings,” “Preferences,” then “Add/remove software.”
- In the search engine, enter “synaptic” and install the package.
- Once installed, navigate to the exact location in the main menu to open it.
- From the top menu, you should see a “Repositories” entry beneath “Settings.”
- In the new window, you’ll have the option to view and change the repository addresses.
- Click an enabled repository to replace the “Distribution” name with the name of the OS you wish to upgrade to. If you’re upgrading an old system, consider updating in incremental steps. For example, not updating from “Jessie” to “Bullseye.”
- Hit “OK” to save your changes.
How to Clean Up Following an Update
It’s advisable to remove any remnants caused by an upgrade after the process is complete. All packages are stored in your device’s cache, which may include packages that no longer exist or are no longer needed. The following steps will clean up redundant packages.
First, search for and uninstall installed packages that are no longer required. To do this, run the following command in Terminal:
sudo apt autoremove
Once these packages are removed, clean up the package archive cache. Run this command to do just that:
sudo apt clean
Then enter the following command to restart Raspberry Pi and have the changes take effect:
How to Update the Raspberry Pi’s Firmware
Pi’s abilities greatly depend on the firmware. It’s the unique software that explicitly translates the instructions from the OS into commands the hardware understands. It’s good practice to keep the firmware updated, and the simplest way is through an updated OS shown above.
However, you may want to continue using a particular OS and experience a performance enhancement without being exposed to security risks.
Here are the steps to update the Pi’s firmware:
First, check the version of firmware your Pi is running as it may already be up-to-date. To do this, enter the terminal window and run the following command:
If an available update is flagged, as previously mentioned, you can run the
sudo apt update, then the sudo apt full-upgrade commands for a complete upgrade.
Or, to update the firmware only, run the following command:
sudo rpi-eeprom-update -d -a
Once the installation is complete, reboot Pi with the following command:
The Pi firmware is now officially upgraded.
Choosing any of the methods above will keep your Raspberry Pi up-to-date. When upgrading the OS, ensure you have backed up your SD card, so if anything breaks, you can return to the previous version. This is especially useful if you want to try out an OS before its official release date. You can also update the firmware only for enhanced features and security before a full OS update.