Skip to content

Instantly share code, notes, and snippets.

@coopbri
Last active April 26, 2024 13:17
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coopbri/0cae1253904f491706618d42236cd094 to your computer and use it in GitHub Desktop.
Save coopbri/0cae1253904f491706618d42236cd094 to your computer and use it in GitHub Desktop.
Automatically update packages on Raspberry Pi OS (most recent version checked: August 2020)
  1. Install unattended-upgrades package:

     # apt install unattended-upgrades
  2. Add Raspberry Pi Foundation sources to unattended-upgrades config:

     # /etc/apt/apt.conf.d/50unattended-upgrades
     
     Unattended-Upgrade::Origins-Pattern {
         ...
         "origin=Raspbian,codename=${distro_codename},label=Raspbian";
         "origin=Raspberry Pi Foundation,codename=${distro_codename},label=Raspberry Pi Foundation";
     };
    
  3. After unattended-upgrades logs are produced, you can verify the new sources are picked up for updates in /var/log/unattended-upgrades/unattended-upgrades.log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment