The latest Raspberry Pi OS is out, and you can easily Upgrade Raspberry Pi OS to the Latest with just a few commands.
Need to update your Raspberry Pi to the latest version of its default operating system but don't know how?
Things have changed a bit since Raspbian was replaced by Raspberry Pi OS.
What you need to know about updating the Raspberry Pi OS is provided here.
Why You Need to Upgrade from Raspbian to Raspberry Pi OS
Your Raspberry Pi is already running Raspbian. Why do you need to update, then?
In 2012, Raspbian was the name of the first version of Raspberry Pi OS to be released. The operating system has been known as Raspberry Pi OS since 2020 when a 64-bit beta version based on Debian as opposed to the Raspbian project was released.
(The same change has now been made to the 32-bit version, which continues to be referred to as Raspbian and is primarily targeted at older Pi models).
Several useful applications are already installed on the Raspberry Pi OS. These include Sonic Pi, Python, Scratch, LibreOffice, and many more programs.
The latest Raspberry Pi updates may be installed via the terminal and are straightforward to accomplish. However, there are two ways to upgrade to Raspberry Pi OS:
- Manually upgrade the terminal
- Flash a fresh image from scratch using SD card writing software
We'll look at each option in more detail below. All Raspberry Pi consumer versions, including the Raspberry Pi Zero and Raspberry Pi 4, may use the steps listed below to work.
Update from Raspbian to Raspberry Pi OS
Flashing a new image is the simplest way to update Raspbian to Raspberry Pi OS. However, this is also an option if you simply want to get your hands dirty in the terminal or need to retain data on your microSD card.
Warning: Take the time to backup any vital data stored on the Raspberry Pi's SD card before beginning the upgrade process, regardless of the method you're using.
To upgrade Raspbian to Raspberry Pi OS, first, confirm that your Raspbian copy is properly upgraded. Everything needs to be in place for a straightforward Raspberry Pi OS upgrade, so it must be at that point.
This means upgrading from Raspbian Stretch (also known as Jessie, Wheezy, etc.) to Raspbian Buster.
Upgrade Raspbian to Raspbian Buster
Open a terminal and enter
sudo apt update
sudo apt dist-upgrade -y
Following that, update the Raspberry Pi's firmware with:
sudo rpi-update
Switching to Raspbian Buster means upgrading repositories. This is easily done in the terminal by editing the sources:
sudo nano /etc/apt/sources.list
Use the arrow keys to browse through the list until you find
deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
Replace “stretch” (or whatever Raspbian version your system is running) with “buster” in this line:
deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
Press Ctrl+X to save and exit, then remove a large changelog file:
sudo apt-get remove apt-listchanges
This will save time when the operating system updates.
With the sources updated, you can run a full package update and upgrade:
sudo apt update
sudo apt dist-upgrade
Please be patient, as this will take some time to finish. Use it when it's done.
sudo apt autoremove -y
…to remove outdated packages with changed dependencies, then
sudo apt autoclean
By removing data that is no longer accessible for download and clearing the package cache, you are saving space on your Raspberry Pi.
Reboot to finish the Raspbian Buster upgrade.
sudo reboot
You could carry on using your Raspberry Pi with a reasonably current OS at this point. However, it would still be Raspbian.
Upgrade Raspbian to Raspberry Pi OS
To upgrade Raspbian to Raspberry Pi OS, a similar procedure is required. You cannot simply upgrade from an older Raspbian version to the Raspberry Pi OS; you must use Raspbian Buster because of the many requirements and dependencies needed.
Here’s how to update Raspbian to Raspberry Pi OS
Open a terminal and enter
sudo apt update
sudo apt dist-upgrade -y
Wait for completion, then run the firmware update:
sudo rpi-update
As before, you need to edit the sources.list file to point to the correct resource.
sudo nano /etc/apt/sources.list
In this file, look for the following line:
deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
Change the line, replacing “buster” with “bullseye”
deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
You can then run the update and upgrade commands:
sudo apt update
sudo apt dist-upgrade
Use the auto clean instruction to discard any unused update files when this is finished, and then reboot.
sudo apt autoclean
sudo reboot
The upgraded Raspberry Pi OS will be running when Raspberry Pi runs.
How to Update Raspberry Pi OS
Remember to check regularly for updates after your system is fully updated.
Use the following commands at the terminal to do this:
sudo apt update
sudo apt full-upgrade
The full-upgrade command is used instead of upgrade as it ensures dependency on the upgraded software is also included, saving time later.
How to Download and Install Raspberry Pi OS to SD Card
You may save time by simply installing the latest release to a microSD card if you wish to start from scratch with the Raspberry Pi OS. If using the same microSD card is required, make a backup of any vital data beforehand.
The Raspberry Pi OS is available in three 32-bit versions for fresh installations:
- Raspberry Pi OS with desktop
- Raspberry Pi OS with desktop and recommended software
- Raspberry Pi OS Lite
For installation, two 64-bit versions may be downloaded right now:
- Raspberry Pi OS with desktop
- Raspberry Pi OS Lite
Additionally, older versions may be downloaded, including the Debian Buster-based version and Raspberry Pi OS (Legacy). These are available for legacy applications in which using Raspberry Pi OS results in errors or incompatibilities, as you would have anticipated. Older Raspberry Pi models are also better suited for them.
Download: Raspberry Pi OS
For installing the Raspberry Pi OS on an SD card, you have six options available to you:
- Raspberry Pi Imager
- BalenaEtcher
- The dd command in the terminal
- NOOBS
- Berryboot
- PINN Lite
In our guide on installing an OS on Raspberry Pi, steps for each of these methods are covered.
It’s Time to Update Raspbian on Your Raspberry Pi
Older Raspbian operating systems are sufficient to get a Raspberry Pi running, but they lack numerous functionalities. This shouldn't come as a surprise since the operating system has been enhanced as the Raspberry Pi's capabilities have developed.
The steps outlined above are all you need to upgrade to the latest version of Raspberry Pi OS and keep everything updated. Don't forget to update your information regularly.