Loved by children and adults alike, the Raspberry Pi is one of the best single board computers, often used in thousands of projects. However, as with all computers, it is important to keep your Raspberry Pi up to date to ensure it has the latest features and fixes.
Most Raspberry Pi devices use Raspbian, a Debian-based Linux operating system specially designed for this tiny PC. If you’ve used Linux before and are comfortable using the terminal, updating your Raspberry Pi shouldn’t be too difficult. If you’re not sure, here’s how to update your Raspberry Pi to the latest version.
How to Update Raspberry Pi
The Raspberry Pi is a tiny, feature-rich computer. It might not sound like much, but it is more than capable of running the best Linux applications, whether you use Raspbian, Ubuntu, or another Linux operating system with it.
This means that, as with any Linux PC, you will want to keep the software packages your Raspberry Pi uses up to date using Raspbian’s built-in package manager – apt.
- To update packages on the Raspberry Pi, open a terminal window or connect to the Pi remotely using an SSH client. First you need to update the package list from the software repository package lists. To do this, type sudo apt update, then press Enter to run it.
- After updating the package lists, type sudo apt full-upgrade and press Enter to update all installed software packages to the latest available versions.
- After completing the package update, it is recommended to tidy up and remove any unnecessary package files by typing sudo apt clean and pressing Enter
While this is not necessary in most cases, feel free to restart your Raspberry Pi by typing sudo reboot after completing the installation of any package updates to ensure the process ends properly.
How to Update Raspberry Pi Firmware
The Raspberry Pi Foundation is responsible for developing the Raspberry Pi as well as the firmware it runs. From time to time, new firmware is released that adds important security fixes or updates to the Raspberry Pi.
To update the Raspberry Pi firmware, run the command sudo apt update or sudo apt full-update, which will update your Raspberry PI with stable firmware releases. If this is not enough and you need to update the firmware to the latest available version (for example, to fix critical bugs), you will need to use the rpi-update tool.
Raspberry PI should ship with Raspbian, but it is also compatible with other Linux operating systems. You can download and install it from the rpi-update GitHub page
- To update your Raspberry Pi firmware, you need to make sure you have the latest version of the rpi-update tool installed. Open a terminal or SSH connection to your Raspberry Pi, then type sudo apt update && sudo apt install rpi-update before hitting Enter.
- If the latest version is installed, type sudo rpi-update to run the firmware update tool, then press Enter. You will need to confirm if you want to proceed with the firmware update by pressing the Y key on your keyboard.
After updating the Raspberry Pi firmware, you will need to reboot – enter sudo reboot to do this if the rpi-update tool does not do it automatically.
How to install a major Raspbian update on a Raspberry Pi
Although the apt update process will update your software packages, it will not update your system. While Raspbian can be manually updated to a new version, there is no automatic tool for this.
Upgrading manually from one version of Raspbian to the next is extremely problematic, especially with package and feature changes from one release to the next. To perform a major upgrade from an earlier version of Raspbian, you must first back up your Raspberry Pi and install the latest Raspbian onto your Raspberry Pi’s microSD card (or SD card for older Pi models).
This is also the method that the Raspberry Pi Foundation recommends when upgrading in place, because it is the cleanest, fastest, and best way to migrate from one major Raspbian version to another. This will erase your microSD card, so make sure any files you want to keep are copied to your external drive before starting.
- To do this, you need to download and install the Raspberry Pi Imager tool for your operating system. This will automatically download the image file for the latest Raspbian version and transfer it to the microSD card directly.
- After installing the Raspberry Pi Imager tool, remove your Raspberry Pi’s microSD card and plug it into your computer, then launch the Raspberry Pi Imager. In the thermal imager window, click the Select OS button and select Raspbian in the options window.
- With Rasbian selected, click the Select SD Card button, then select your microSD card from the SD card selection menu.
- When you’re ready to start flashing your microSD card with the latest version of Raspbian, click the Write button.
- The Raspberry Pi Imager Tool will take a while to download and burn Raspbian to your microSD card. Once the process is complete, click Continue to close the tool.
At this point, you should be able to safely remove the microSD card, insert it back into your Raspberry Pi, and turn it on. If the process was successful, you should be able to continue with the initial installation and restore all files from the backups to a fresh Raspbian installation.
You should also open a terminal window and run sudo apt update && sudo apt full-upgrade to ensure that the latest software packages are installed for your new Raspbian installation.
Update your Raspberry Pi
While Linux devices such as the Raspberry Pi are generally considered more secure than their Windows counterparts, that doesn’t mean updating the Raspberry Pi isn’t necessary. Regular updates bring new software, bug fixes, improvements, and more.
Now that you know how to update your Raspberry Pi, it’s probably a good idea to get comfortable with the Linux terminal, especially some cool Linux terminal commands you can try on your Pi. Let us know your own tips and ideas for Raspberry Pi projects in the comment section below.