How do I utterly stop automatic update checks in Ubuntu 19.04?
I had the same problem. ‘Automatically check for updates’ set to ‘Never’ in the ‘Software & Updates’ dialogue but repositories still being updated (i.e. the equivalent of running sudo apt-get update
) and then updates suggested for download by update-notifier (I presume because I still had ‘When there are [x] updates’ set to ‘Display immediately’).
Reading the answer to this question (How can I ban Software Updater from checking for updates at certain times of day or certain days of week?) has led me to this answer:
- gnome-software is doing it
- I have uninstalled it (
sudo apt-get purge gnome-software
) and – so far as I can tell – the repositories are no longer being automatically updated - I didn’t try it, but the link above and my reading of the dconfig page for it (‘Description: If enabled, GNOME Software automatically downloads updates in the background and prompts the user to install them when ready’) suggests that using dconfig to set /org/gnome/software/download-updates to false, or just running
gsettings set org.gnome.software download-updates false
, will also do the trick
You may also need to remove unattended-upgrades (sudo apt-get purge unattended-upgrades
), but I had done that already and it didn’t stop the problem dealt with here. Put another way, removing unattended-upgrades may also be necessary to deal with this problem but it is not sufficient.
Incidentally, I think that this is a bug, or at least a mistake. If a user (who just wants to use Ubuntu out of the box without coming to AskUbuntu or similar sites to get under the hood) sets a system setting called ‘Automatically check for updates’ to ‘Never’ then a piece of default software should not cut across that decision. I have seen a number of people argue, well, it is in their best interests to have automatic updates, sure, perhaps it is, but if they are given the option to say they don’t want them, and they take it, then they shouldn’t get them!
Commenting out all the repos mentioned in /etc/apt/sources.list (and sources.list.d/* if there are any) seems to do the trick. I still have no idea what is the origin of the unstoppable tasks desperately wanting to tell me about updates, but if there are no repos defined, it seems to thwart them.
For all those wondering why I want to turn them off: This is a virtual machine operating in a qcow2 image with a backing file, and it is destined to be completely reset to the original backing file after testing. I don't want network activity screwing up my testing, and if it did download updates, it would all be wasted effort since they will be discarded when the file image is reset to the base state again. Fortunately it was simple to add a little script to guestmount the image and edit sources.list every time I reset the file image.
Uninstalling update-notifier
should take care of the notices.
sudo apt remove update-notifier update-notifier-common