Skip to content
Vilros

How to update a Raspberry Pi

Keep your Raspberry Pi fast and secure with three Terminal commands: check for updates, install them, then restart.

  • Raspberry Pi
  • Beginner
  • 10 to 30 minutes
  • 4 steps

Before you start

  • A Raspberry Pi that has started up and shows the desktop
  • An internet connection (Wi-Fi or Ethernet)
  • A keyboard, so you can type three short commands

Open the Terminal

About 1 minute

Open the app where you type commands.

  1. Click the Terminal icon in the menu bar at the top of the screen. It looks like a black window with a prompt.
  2. Can't see it? Open the Raspberry Pi menu in the top-left corner, choose Accessories, then Terminal.

You should see

A window opens with a blinking cursor after your username and the name of your Pi.

Check for updates

About 2 minutes

Ask your Pi which software has newer versions available.

  1. Type this command into the Terminal, then press Enter.
Type in the Terminal
sudo apt update

This only checks. Nothing is installed yet.

You should see

Lines of text scroll by, then it finishes and tells you how many packages can be upgraded, or that all packages are up to date.

It didn't work
  • It says it could not resolve a host, or a download failed.

    Your Pi isn't online. Check the Wi-Fi icon at the top right or your Ethernet cable, then run the command again.

  • It says it could not get a lock, or another process is using it.

    Your Pi is already installing updates in the background. Wait a few minutes, then run the command again.

Install the updates

About 15 minutes

Download and install everything that's waiting.

  1. When the first command has finished, type this command and press Enter.
  2. Stay near the screen. It can take a while, and now and then it asks you a question. If you miss one, your Pi stops and waits for you, which makes the whole update take longer.
  3. If it asks whether you want to continue, type Y and press Enter.
Type in the Terminal
sudo apt full-upgrade

Safe to run, but it can be slow. The time depends on how many updates are waiting.

You should see

The text stops scrolling and you see your username and prompt again, ready for a new command.

It didn't work
  • The screen has stopped moving.

    Scroll to the bottom of the Terminal. Your Pi may be waiting for an answer. Type Y or the option it shows, then press Enter.

Restart your Pi

About 2 minutes

Restart so the updates take effect.

  1. Save anything you have open in other windows.
  2. Type this command and press Enter. You can also restart from the Raspberry Pi menu: choose Shutdown, then Reboot.
Type in the Terminal
sudo reboot

You should see

The screen goes dark for a moment and your Pi starts up again with the updates in place.

What to do next

Stuck? Contact Vilros Support with your Pi model and what you see on screen.