How to Update Raspberry Pi OS: Step-by-Step Guide
To update Raspberry Pi OS, open the terminal and run
sudo apt update to refresh package lists, then run sudo apt full-upgrade to install all updates. Finally, reboot your Raspberry Pi with sudo reboot to apply changes.Syntax
Updating Raspberry Pi OS involves three main commands:
sudo apt update: Refreshes the list of available software updates.sudo apt full-upgrade: Installs all available updates, including kernel and system packages.sudo reboot: Restarts the Raspberry Pi to apply updates.
bash
sudo apt update sudo apt full-upgrade sudo reboot
Example
This example shows how to update your Raspberry Pi OS safely using the terminal commands step-by-step.
bash
pi@raspberrypi:~ $ sudo apt update Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease Reading package lists... Done Building dependency tree Reading state information... Done All packages are up to date. pi@raspberrypi:~ $ sudo apt full-upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages will be upgraded: libc-bin libc6 2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 2,345 kB of archives. After this operation, 1,024 B of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://raspbian.raspberrypi.org/raspbian buster/main armhf libc6 armhf 2.28-10+rpi1 [2,345 kB] Fetched 2,345 kB in 2s (1,172 kB/s) (Reading database ... 123456 files and directories currently installed.) Preparing to unpack .../libc6_2.28-10+rpi1_armhf.deb ... Unpacking libc6:armhf (2.28-10+rpi1) over (2.28-9+rpi1) ... Setting up libc6:armhf (2.28-10+rpi1) ... Processing triggers for libc-bin (2.28-10+rpi1) ... pi@raspberrypi:~ $ sudo reboot
Output
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
libc-bin libc6
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,345 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://raspbian.raspberrypi.org/raspbian buster/main armhf libc6 armhf 2.28-10+rpi1 [2,345 kB]
Fetched 2,345 kB in 2s (1,172 kB/s)
(Reading database ... 123456 files and directories currently installed.)
Preparing to unpack .../libc6_2.28-10+rpi1_armhf.deb ...
Unpacking libc6:armhf (2.28-10+rpi1) over (2.28-9+rpi1) ...
Setting up libc6:armhf (2.28-10+rpi1) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
Common Pitfalls
Some common mistakes when updating Raspberry Pi OS include:
- Not running
sudo apt updatefirst, which can cause outdated package lists and failed upgrades. - Using
apt upgradeinstead ofapt full-upgrade, which may skip important kernel or system updates. - Not rebooting after updates, leaving the system running old versions.
- Interrupting the update process, which can corrupt the system.
bash
Wrong way: sudo apt upgrade Right way: sudo apt full-upgrade
Quick Reference
Keep these tips in mind for smooth Raspberry Pi OS updates:
- Always run
sudo apt updatebefore upgrading. - Use
sudo apt full-upgradeto get all updates. - Reboot with
sudo rebootafter updates. - Ensure a stable internet connection during updates.
- Backup important data before major upgrades.
Key Takeaways
Always run
sudo apt update before upgrading to refresh package lists.Use
sudo apt full-upgrade to install all system updates safely.Reboot your Raspberry Pi with
sudo reboot to apply updates.Avoid interrupting the update process to prevent system corruption.
Backup important data before performing major system upgrades.