Just a quick note to self for the future. The instructions in this post will set-up automatic update of all packages (as opposed to security-only). It has been tested on Raspbian Stretch.
As root, edit /etc/apt/apt.conf.d/50unattended-upgrades and add the lines below to the Unattended-Upgrade::Origins-Pattern section:
Now run the following command to test it:
To ensure that the service is enabled and operational run:
sudo apt-get install unattended-upgrades
Unattended-Upgrade::Origins-Pattern {
"origin=Raspbian,codename=${distro_codename},label=Raspbian"; "origin=Raspberry Pi Foundation,archive=stable";
};
Now run the following command to test it:
sudo unattended-upgrades -d
Also consider changing the following lines in 50unattended-upgrades, which includes removing unused packages and rebooting automatically regardless of logged in users at a set time if needed, e.g. after a kernel upgrade:
Unattended-Upgrade::Remove-Unused-Dependencies "true";
Unattended-Upgrade::Automatic-Reboot "true";
Unattended-Upgrade::Automatic-Reboot-WithUsers "true";
Unattended-Upgrade::Automatic-Reboot-Time "06:30";
To ensure that the service is enabled and operational run:
sudo systemctl status unattended-upgrades