10

What are the advantages of unattended-updates over cron-apt and vice versa?

Basically I want a fully automatic upgrade process in the night:

  • install all updates (even non-security)
  • reboot if necessary
  • it would be good also to trigger a scheduled maintenance in our icinga on before reboots
2

1 Answer 1

3

cron-apt

Cron-apt only downloads new packages by default. This can be useful if you have a strongly customized system. (for more details, see source [1])

unattended-upgrades

apt includes support for running an unattended upgrade script; Ubuntu includes this with the ''unattended-upgrade'' package which handles both security and non-security updates. The frequency of updates can be changed by setting the variable APT::Periodic::Unattended-Upgrade "x"; where x is the number of days, e.g. "1"

Check if the value is already set somewhere with:

sudo grep Periodic::Unat /etc/apt -rH

if not, add the line in a the file /etc/apt/apt.conf.d/20auto-upgrades

This is the recommended way to do unattended upgrades in Ubuntu:

sudo apt-get install unattended-upgrades
dpkg-reconfigure -plow unattended-upgrades

(-plow is the short form of --priority=low. That is, show all questions of 'low' priority or higher.)

Automatic upgrades can break your system, so be aware, that you should only install this on systems where a failiure is not fatal to any means.

[1] Source: https://help.ubuntu.com/community/AutoWeeklyUpdateHowTo

1
  • dpkg-reconfigure -plow unattended-upgrades worked!!
    – kujiy
    Apr 11, 2017 at 0:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .