How to keep your Raspberry Pi updated

Learn how to keep your Raspberry Pi patched and working well in the seventh article in our guide to getting started with the Raspberry Pi.
170 readers like this.
Perl tricks for system administrators

Opensource.com

Just like your tablet, cellphone, and laptop, you need to keep your Raspberry Pi updated. Not only will the latest enhancements keep your Pi running smoothly, they will also keep you safer, especially if you are connected to a network. The seventh article in our guide to getting started with the Raspberry Pi shares two pieces of advice on keeping your Pi working well.

Update Raspbian

Updating your Raspbian installation is a two-step process:

  1. In your terminal type: sudo apt-get update

    The command sudo allows you to run apt-get update as admin (aka root). Note that apt-get update will not install anything new on your system; rather it will update the list of packages and dependencies that need to be updated.
  1. Then type: sudo apt-get dist-upgrade

    From the documentation: "Generally speaking, doing this regularly will keep your installation up to date, in that it will be equivalent to the latest released image available from raspberrypi.org/downloads."

How to update your Pi

Be careful with rpi-update

Raspbian comes with another little update utility called rpi-update. This utility can be used to upgrade your Pi to the latest firmware which may or may not be broken/buggy. You may find information explaining how to use it, but as of late it is recommended never to use this application unless you have a really good reason to do so.

Bottom line: Keep your systems updated!

User profile image.
Anderson was introduced to Linux by his uncle back in 1996. In the early 2000s, he transitioned from being a developer to a system administrator. Today, Anderson leads the Red Hat Information Security Incident Response team. He is also an active Fedora package maintainer.

3 Comments

Maybe it should be noted that "apt-get dist-upgrade" does update installed packages to the latest version, but only for the current distro-version (e.g. jessie or stretch).

To do a real upgrade to the latest distro-version and packages, you'll have to replace every occurence of the former distro-verison (like jessie) to the one you wan to update to (e.g. stretch) in /etc/apt/sources.list before executing the update and dist-upgrade.

Please explain how to do a "real upgrade to the latest distro-version and packages".

Plead post necessary commands.
Thanks

In reply to by greenit

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.