zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

Debian unattended-upgrades

February 10, 2019 by Igor Drobot Leave a Comment

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

dpkg-reconfigure unattended-upgrades

Configuration files:

1
2
/etc/apt/apt.conf.d/50unattended-upgrades
/etc/apt/apt.conf.d/20auto-upgrades

/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";

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";

"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";

"Unattended-Upgrade::MailOnlyOnError "true";


This option make sure that you get a mail if there is something going wrong.

Filed Under: Linux Tagged With: apt, aptitude, Debian, security, Ubuntu, Updates

Categories

Archives

Tags

apache2 Apple arduino ARM Automation backup bash Cisco Cluster Corosync Database Debian Debian squeeze DIY DNS Fedora FTP Fun Icinga Ipv6 KVM Linux LVM MAC OS X Monitoring MySQL Nagios Nginx openSUSE OpenVPN PHP Proxy Python python3 qemu RAID rsync Samba security ssh Ubuntu virtualization Windows Windows 7 Wordpress

Leave a Reply

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

Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok