0

I've been able to configure automatic security updates with:

sudo dpkg-reconfigure unattended-upgrades

Running the above command brings up a configuration page. I only need to hit enter twice and the process is complete.

I'm looking for a way to automate the setup. For example with apt-get install I can use the -y flag.

Is there a way I can do this with unattended-upgrades so the process can be automated?

Philip Kirkbride
  • 1,539
  • 4
  • 30
  • 51
  • 1
    Possibly related [How can I install apt packages non-interactively?](https://askubuntu.com/a/556387/178692) (i.e. probably what you really want to know is how to run `dpkg-reconfigure` non-interactively) – steeldriver May 12 '17 at 16:03
  • 1
    Unattended-upgrades is enabled by default in 16.04 and newer versions of Ubuntu. Configurations are in /etc/apt/apt.conf . What exactly do you need to configure? – user535733 May 12 '17 at 22:57

1 Answers1

0

That can be done by adding noninteractive to the command:

dpkg-reconfigure -f noninteractive unattended-upgrades

where the -f option in dpkg-reconfigure selects which debconf frontend to use (here set to noninteractive).

Hrafn
  • 232
  • 1
  • 13