rpi-update and apt-get update/upgrade on the #RaspberryPi explained

I’m just sitting here running updates on my Pi in an effort to get camera streaming working and I thought it would help to give an explanation of the various updates you might want to run. I found a rather good answer on Stack Exchange and thought I’d replicate it here for reference. Thanks to Caleb and Ivo Rocha for the original:

  • rpi-update is a tool to upgrade the firmware for your Raspberry Pi. Firmware is a small package of code that usually lives on a special chip of a computer that helps the software know how to talk to the hardware. However, in the case of the Raspberry Pi, the firmware will live on the first partition of the SD card.
  • Raspbian is an operating system or the core software for your Raspberry Pi. Software (including the OS) lives on second partition of the SD card and is all the stuff that gets executed when you use your device.

Both of these need updating independently. For convenience, the rpi-update tool is included in the Raspbian distribution of Linux because it is a useful software tool that manages the firmware of your Pi’s. You should run it periodically to make sure your devices have the latest firmware. Separately, you need to keep your software up to date using the standard Debian software management tools like sudo apt-get update && sudo apt-get upgrade.

Each of these functions is separate, and updating one will not update the other. Upgrading your distribution to the latest software packages might get you a new version of rpi-update, but unless you RUN rpi-update your firmware will not get updated.

Since the place the firmware is stored is actually flashed to the first partition of the SD card (sort of like a BIOS), you will not need to run this on every device. Once you load a new version of software or firmware onto an SD card, any device you plug that card into will be running that version.

Best practice

I added this bit after a blog comment from Foundation guru Gordon Hollingworth.

Please note that although the rpi-update updates the firmware, it also will update the linux kernel (if there is a new one!) But so will sudo apt-get upgrade…. So if you do it in the wrong order then you could upgrade the firmware (with rpi-update) and then downgrade it with apt-get update/upgrade

Make sure you do it in the following order:

  • sudo apt-get update
  • sudo apt-get upgrade
  • Then, if you want the bleeding-edge version… sudo rpi-update

That will make sure you end up with the latest version of the kernel.

As others have commented, rpi-update is useful if you want the latest, latest, latest version of the firmware, but does carry with it a few risks to the stability of your system.

10 comments for “rpi-update and apt-get update/upgrade on the #RaspberryPi explained

  1. 20 December 2013 at 6:42 pm

    You should also note that although the rpi-update updates the firmware, it _also_ will update the linux kernel (if there is a new one!) But so will sudo apt-get upgrade….

    So if you do it in the wrong order then you could upgrade the firmware (with rpi-update) and then downgrade it with apt-get update/upgrade

    Make sure you do:

    sudo apt-get update
    sudo apt-get upgrade
    sudo rpi-update

    That will make sure you end up with the latest version of the kernel (some may say bleeding edge!)


    • 20 December 2013 at 6:45 pm

      Thanks Gordon – I’ll update the text to reflect that

    • 21 December 2013 at 11:53 pm

      That’s how I understand it as well Gordon. Both rpi-update and apt-get do both the firmware and the kernel they are not for different things. From what I’ve seen rpi-update also does other stuff as well such as raspistill. Also as you point out rpi-update is a bit bleeding edge and not a good idea for most users for whom using apt-get will get them everything they need.

    • 22 December 2013 at 12:00 am

      I agree with Gordon rpi-update and apt-get both do both the firmware and kernel (and other stuff as well like raspistill). The difference is rpi-update takes you to the bleeding edge whereas apt-get takes you to the latest stable release. That’s why apt-get can downgrade rpi-update. Upgrading stuff outside of apt-get is rarely a good idea as it can leave you with unexpected results.

  2. 21 December 2013 at 11:28 pm

    I could be wrong but that isn’t my understanding… this is what I believe is going on:

    When the foundation refer to firmware they are actually (incorrectly in my opinion) referring to both the Raspbian OS and the binary blobs which are in /boot (which is what you are calling the firmware).

    The only reason RPI-Update exists is in the old days there was no Rapberry Pi specific repositories so you didn’t get updates for the binary blobs and other Raspberry Pi specific commands (such as raspi-config) through apt-get update/upgrade, you would only get generic Linux/Debian updates. To solve this Hexxeh developed RPI Update to pull the latest updates from the dev channels to save people from waiting for the next Raspbian release to solve problems (which at the time were critical).

    However now the Raspberry Pi repos exist all the tested release updates come through the correct apt-get update/upgrade chanels and this is the only method you should use. You should NOT use rpi-update anymore unless you want to run the unstable bleeding edge dev environment which is a bad idea. Chances are at some point you something will break if you do this.

    Please take a look at the following link for example:

    Unfortunately the old “you need to run rpi-update” thing has been dragged on from days of old and many people don’t really understand it. Like I said unless you are a developer you should NOT be using rpi-update.

    …that’s my understanding anyway.
    Sorry if I come across a but harsh but I’ve had to deal with people who have had problems with BerryIO a few times and its been because their Raspbian install was broken from running RPI update.

  3. 21 December 2013 at 11:32 pm

    Answers 6 and 2 on that Stack Exchange link are correct. Answer 28 which you are referring to is wrong. I blame the foundation for incorrectly calling Raspbian “firmware” personally, it causes a lot of confusion.

  4. Bonzadog
    26 October 2016 at 10:21 am

    very interesting!
    But what about the dist-upgrade?


    • 26 October 2016 at 10:50 am

      Theres a good explanation of the difference between upgrade and dist-upgrade here:

      The key point is:
      “Using upgrade keeps to the rule: under no circumstances are currently installed packages removed, or packages not already installed retrieved and installed. If that’s important to you, use apt-get upgrade. If you want things to “just work”, you probably want apt-get dist-upgrade to ensure dependencies are resolved.”

Leave a Reply to Bonzadog Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.