Comments on Automatic updates with unattended-upgrades on Debian and Ubuntu

This tutorial shows how to configure unattended updates on Debian and Ubuntu. It covers all recent Debian and Ubuntu versions incl. Ubuntu 22.04 and Debian 11.

4 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: James D Freels

I believe you meant to say apt.conf.d instead of apt.conf in the phrase (create the file if it does not exist in directory /etc/apt/apt.conf/).

By: Taleman

That is indeed a typo. Well spotted, James. 

By: nhybgtvfr

 

some of it may have changed now...   at least on ubuntu 22.04.     there is no Unattended-Upgrade::Update-Days in the 50unattended-upgrades file.

instead there are now 2 timer files in /lib/systemd/system...  apt-daily.timer  for the update downloads.  and apt-daily-upgrade.timer for applying the updates.

with the day/month/hour times and randomized delays set using OnCalendar and RandomizedDelaySec in these files.

 

and i know it's recommended to not change these, but personally, i would prefer to set it.  random twice daily update downloads is fine, but i would like to know exactly when upgrades are being applied... i don't like the idea of a possible breaking upgrade getting applied at a random time.   set it to run within a set hour of 1 day of the week.

 

and

//Unattended-Upgrade::MailOnlyOnError "false";

is now //Unattended-Upgrade::MailReport  with the options 'always' 'only-on-error' or 'on-change'

By: nhybgtvfr

just to note..  although it's all configured when installed/enabled as part of the ispconfig auto-installer..   it sets the origin for php to deb.sury.org  which is fine for debian, but doesn't install all the php updates on ubuntu.  It looks like the correct origin for the ubuntu ondrej php repository is 'LP-PPA-ondrej-php'