Why is unattended-upgrades activated by default?
Solution 1
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";
};
Solution 2
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";
Solution 3
Another way is to use: dpkg-reconfigure unattended-upgrades
Related videos on Youtube
Cucumber
Updated on September 18, 2022Comments
-
Cucumber over 1 year
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
-
Javier Rivera almost 8 yearsAFAIK the setup is asking to download updates during the setup so it installs updates packages, not about activating or not "unattended-upgrades".
-
David Tabernero M. over 5 yearsI 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.
-
caw almost 3 years
-
-
hheimbuerger almost 6 yearsIsn't that file called
20auto-upgrades
, not20auto-updates
? -
wedi almost 6 yearsFiles 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".
-
B. Shea over 4 years@wedi Yes - and this should be taken advantage of. It avoids a package overwriting your changes on system updates. You have to make sure when using any
conf.d
area that your custom directive(s) come LAST. The filename20auto-updates
if used as user-created new override file, would be read in BEFORE20auto-upgrades
. Last file read wins. Better idea on anyconf.d
area is to create something you know will be read DEAD LAST. Try creating99z-custom
in/etc/apt/apt.conf.d
with the statementAPT::Periodic::Unattended-Upgrade "0";
- it will be read last. Again: Last wins. -
B. Shea over 4 yearsGood rule of thumb when overriding in
conf.d
areas: Better to always create a custom override file when possible.99z-custom
would work in this area I think (untested). When apt updates itself your50unattended-upgrades
files might be overwritten. Your custom file will not. -
caw almost 3 yearsCorrect. This also sets
APT::Periodic::Unattended-Upgrade
andAPT::Periodic::Update-Package-Lists
in/etc/apt/apt.conf.d/*
.