Skip to content
GEEKnodes

Raspberry Pi · Updated on

How to Update Raspberry Pi OS and Firmware

Update Raspberry Pi OS, kernel, firmware and EEPROM bootloader with apt and rpi-eeprom-update, and learn when you should not use rpi-update.

Keeping your Raspberry Pi up to date gives you security fixes, performance improvements and support for new hardware. This guide shows how to update Raspberry Pi OS (formerly Raspbian), what happens with the kernel and firmware, how to check the bootloader on the Raspberry Pi 4 and 5, and why rpi-update is no longer the command you should use day to day.

Before you start

  • Access to a terminal on the Raspberry, either directly or over SSH.
  • A stable internet connection.
  • Free space on the card. Check it with:
df -h
  • If the Raspberry does something important (a server, OctoPrint…), back up the card before a big update.

To see your system version:

cat /etc/os-release

The current version of Raspberry Pi OS is based on Debian Trixie; the previous one on Debian Bookworm.

Step 1: update the package list

sudo apt update

This command installs nothing: it only downloads the list of versions available in the repositories.

Step 2: install the updates

Update flow: apt update queries packages, full-upgrade installs kernel and firmware, and rebooting applies the changes.
The list is updated first; kernel and firmware apply on reboot.
sudo apt full-upgrade

The official documentation recommends full-upgrade over upgrade, because Raspberry Pi OS changes package dependencies more often than Debian and upgrade can leave packages held back. This step also updates the Linux kernel and the stable firmware (raspi-firmware package), so in normal use you need nothing else.

Then you can remove packages no longer used:

sudo apt autoremove

Step 3: reboot

If the kernel or firmware was updated, changes do not apply until you reboot:

sudo reboot

Step 4: check the bootloader (Raspberry Pi 4 and 5)

The Raspberry Pi 4, 400 and 5 keep the bootloader in an EEPROM on the board, not on the card. To check for a newer version:

Generic board with the bootloader EEPROM separate from the microSD card and a check with rpi-eeprom-update.
On the Raspberry Pi 4 and 5, the bootloader lives in the board’s EEPROM.
sudo rpi-eeprom-update

The command shows the installed and available versions. If there is a new one and you want to apply it:

sudo rpi-eeprom-update -a
sudo reboot

By default the default release channel is used, which receives new hardware support, critical fixes and periodic features. There is also a latest channel that updates as soon as new features exist. You choose it in the FIRMWARE_RELEASE_STATUS line of /etc/default/rpi-eeprom-update. Unless you have a specific reason, stay on default.

What about rpi-update?

The original version of this article recommended sudo rpi-update to get “the latest firmware”. Today the official documentation advises against it for normal use: rpi-update installs test (pre-release) firmware and kernel that are not guaranteed and can leave the system unstable or even unbootable. It is meant for developers and for cases where a Raspberry Pi engineer asks you to try a specific fix.

Comparison between stable full-upgrade and rpi-update with pre-release kernel and firmware and risk of instability.
For normal use, this article recommends the stable apt channel.

If you already used it and have problems, you can go back to stable firmware:

sudo apt install --reinstall raspi-firmware
sudo reboot

Moving to a new major version

apt full-upgrade keeps you current within your version (for example, Bookworm). To move from Bookworm to Trixie, the official recommendation is not an in-place upgrade but a clean install:

  1. Back up your data and settings.
  2. Write the new version with Raspberry Pi Imager to another card (or the same one, knowing everything is erased).
  3. Restore your data and reinstall your programs.

Check that it works

After rebooting, check the kernel version and that no updates are pending:

uname -a
sudo apt update
apt list --upgradable

If the list is empty, you are up to date. On a Raspberry Pi 4 or 5, sudo rpi-eeprom-update should report the bootloader is current.

Common problems

apt complains about no space. Free it with sudo apt clean and sudo apt autoremove, and check with df -h what is taking up the card.

Could not get lock /var/lib/dpkg/lock-frontend. Another installation is running (sometimes an automatic desktop update). Wait for it; do not delete lock files lightly.

Signature or repository errors in apt update. Usually because the system date and time are wrong (the Raspberry has no battery clock except the 5 with its optional battery). Check with date and make sure the Raspberry has network.

The Raspberry will not boot after rpi-update. Mount the card on another computer and recover your data, or write the system again. Next time use only apt full-upgrade.

The update is interrupted (power or network cut). Run sudo apt full-upgrade again; if dpkg asks, run sudo dpkg --configure -a first.

Frequently asked questions

How often should I update? Once a week or month is reasonable for home use. For a Raspberry exposed to the internet, more often.

Can I automate it? Yes, with Debian’s unattended-upgrades package, although for delicate projects it is better to update by hand and review what changes.

Gear

Raspberry Pi 4 (4 GB) Raspberry Pi 4 (2 GB)

Accessibility preferences

Quick profiles

Text and reading

Text size
Default
Line height
Default
Letter spacing
Default
Word spacing
Default

Colour

Motion and orientation

Cursor