UnattendedUpgrades is since Debian 9 a part of default installation.
Only with graphical desktop environment, its activated by default.
For server systems, the following basic configuration is required:
1 | dpkg-reconfigure unattended-upgrades |
Configuration files:
1 2 | /etc/apt/apt.conf.d/50unattended-upgrades /etc/apt/apt.conf.d/20auto-upgrades |
The last one gets automatically created by running dpkg-reconfigure unattended-upgrades.
Set within the 50unattended-upgrades file the correct e-mail address to be notified on any action of UnattendedUpgrades.
1 | Unattended-Upgrade::Mail "report@example.com"; |
and deccoment the following lines, within the section Unattended-Upgrade::Origins-Pattern:
1 2 3 4 | "origin=Debian,codename=${distro_codename}-updates"; "origin=Debian,codename=${distro_codename}-proposed-updates"; "origin=Debian,codename=${distro_codename},label=Debian"; "origin=Debian,codename=${distro_codename},label=Debian-Security"; |
Now your system will be automatically patched by unattended-upgrades and you will be notified about all performed or outstanding actions.
Just a perfect automation for home or just less relevant systems.
To avoid the daily reports of the successful update runs, you should set:
1 | "Unattended-Upgrade::MailOnlyOnError "true"; |
This option make sure that you get a mail if there is something going wrong.
Leave a Reply