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?

2
  • 1
    Possibly related How can I install apt packages non-interactively? (i.e. probably what you really want to know is how to run dpkg-reconfigure non-interactively) May 12, 2017 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, 2017 at 22:57

1 Answer 1

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).

You must log in to answer this question.

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