8

I just migrated from CentOS to Ubuntu Server 16.04 LTS. I chose "no" when it asked me to do automatic updates during the setup. However, I just realized that by default unattended-upgrades is activated and installed by default, since it had installed a kernel update automatically. This is very Windows like and is disappointing me. Why is this the case that it is enabled by default even though the user chose no during the setup?

Thanks

  • AFAIK the setup is asking to download updates during the setup so it installs updates packages, not about activating or not "unattended-upgrades". – Javier Rivera Jun 10 '16 at 16:05
  • I was about to ask exactly that, it's like I have to remember for every fresh new xbuntu installation that I have to disable them. – David Tabernero M. Oct 10 '18 at 8:08
4

I can't explain why it gives you the option and then ignores your response. Without installing, I can't confirm that behaviour, however, it's easy to fix it.

Edit /etc/apt/apt.conf.d/50unattended-upgrades and comment out the -security line.

// Automatically upgrade packages from these (origin:archive) pairs
Unattended-Upgrade::Allowed-Origins {
//      "${distro_id}:${distro_codename}-security";
//      "${distro_id}:${distro_codename}-updates";
//      "${distro_id}:${distro_codename}-proposed";
//      "${distro_id}:${distro_codename}-backports";
};
8

Another way to disable unattended upgrades is to

Edit /etc/apt/apt.conf.d/20auto-updates and set "Unattended-Upgrade" to "0".

APT::Periodic::Unattended-Upgrade "0";
  • 1
    Isn't that file called 20auto-upgrades, not 20auto-updates? – hheimbuerger May 18 '18 at 20:31
  • 1
    Files from linux's *.d folders are read in alphanumeric order irrespective of their exact name. Thus, the answer will work as long as the name is alphanumerically bigger than "10periodic". – wedi Jul 29 '18 at 20:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.