Configuring automated security updates

  1. Install Unattended upgrades package:

apt update
apt install -y unattended-upgrades
  1. Edit file 50unattended-upgrades:

vi /etc/apt/apt.conf.d/50unattended-upgrades
  1. Uncomment the following line and save the file:

"origin=Debian,codename=${distro_codename},label=Debian";
"origin=Debian,codename=${distro_codename},label=Debian-Security";
"origin=Debian,codename=${distro_codename}-security,label=Debian-Security";
  1. Test the configuratio:

unattended-upgrades --dry-run --debug
  1. Enable the service and set to start on boot

systemctl start unattended-upgrades
systemctl enable unattended-upgrades

Last updated

Was this helpful?