This guide will walk you through how to safely update your Raspberry Pi OS and firmware using the command line.
🧰 What You’ll Need
- A Raspberry Pi with internet access
- Terminal access (via desktop or SSH)
- Basic Linux commands
🖥 Step 1: Open the Terminal
You can use the terminal directly on your Pi or connect via SSH from another device. Once you’re in, you’re ready to begin.
🔄 Step 2: Update Package Lists
Start by refreshing the package list to see what’s available for update:
sudo apt update
⬆️ Step 3: Upgrade Installed Packages
Now upgrade all installed packages to their latest versions:
sudo apt full-upgrade -y
This ensures your Raspberry Pi OS gets the latest patches and features.
⚙️ Step 4: Update the Firmware (Optional but Recommended)
To upgrade the bootloader and kernel firmware, use:
sudo rpi-update
Note: This pulls bleeding-edge firmware. For critical or production systems, consider sticking with just apt full-upgrade
unless you need a specific fix.
🔁 Step 5: Reboot
Once updates are complete, reboot your Raspberry Pi to apply all changes:
sudo reboot
✅ Check System Version
After rebooting, verify your system is up-to-date with:
uname -a
Or check OS version with:
lsb_release -a
🧠 Pro Tips for Staying Updated
- Set a reminder to update every few weeks
- Use
apt list --upgradable
to preview available updates - Consider using a backup tool (like rsync or SD card cloner) before major upgrades