8

I have tried many suggestions, and none of them work. I don't want my Ubuntu system to touch the network in any way shape or form to check for updates until I explicitly run an update check.

I've set the check to "Never" in the GUI app with the repos. I've disabled every systemd timer that says something about update. Still I get update-notifier notifications popping up from time to time.

What on earth do I have to do to stamp out this scourge on Ubuntu 19.04?

Note that I don't want to just disable the update-notifier popup; I want to disable all network traffic doing the update check.

More details on what I have already done:

systemctl disable apt-daily-upgrade.timer apt-daily.timer

Run Software & Updates, go to Updates tab set "Automatically check for updates" to "Never".

5
  • 2
    Please provide more details on what you have already tried.
    – Andrew
    Apr 30 '19 at 22:06
  • 2
    If you are serious about blocking all updates, you will probably have to blacklist the ips of these servers. What is the reason you want to block updates? Is it a matter of limiting network usage? Or controlling which updates are applied? Apr 30 '19 at 22:17
  • 2
    askubuntu.com/q/309634/367990 maybe? But as above, why would you want to do this in the first place? Maybe there is a better solution to your actual goal than this way.
    – Byte Commander
    Apr 30 '19 at 22:26
  • I wonder if I could just comment out every repo mentioned in /etc/apt/sources.list and only put them back when I actually want to update? May 1 '19 at 0:37
  • @RyanJ.Yoder has the correct answer.
    – Rinzwind
    May 1 '19 at 17:34
3

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!

1
  • Couldn't agree more. If an option is present and is taken by the user, the user should get the result described. Any other situation leads to frustration and distrust.
    – 4dummies
    Dec 25 '20 at 17:29
2

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.

5
  • 3
    That's like whacking a mole with a nuclear weapon.
    – vidarlo
    May 1 '19 at 17:13
  • 1
    this will not stop snaps from updating.
    – Rinzwind
    May 1 '19 at 17:34
  • 2
    But the mole is indeed dead :-). Snaps are also no problem because I long ago ran: "apt-get purge snapd" (practically the first thing I do on any ubuntu install). May 2 '19 at 11:06
  • @vidario If you prefer a hammer over the nuke, see my answer below. May 11 '19 at 9:21
  • @user1160711 And what if you want to keep the possibility to add packages ? This is not the most satistying solution by far. You shouldn't have to block a task that's trying to run, that's like fighting against your own system. Instead there should be a way for it to not even try to run when asked not to. I know Windows has accustomed us to such behaviour, but we're not talking of Windows here.
    – NovHak
    Nov 13 '19 at 16:13
2

I have disabled several services in an attempt to prevent the automatic checking for upgrades:

sudo systemctl disable apt-daily.service apt-daily-upgrade.service
sudo systemctl disable apt-daily.timer apt-daily-upgrade.timer
sudo apt remove --purge -y unattended-upgrades
gsettings set com.ubuntu.update-notifier no-show-notifications true

I also remove the snaps, as these check by default, 4 times / day:

sudo snap remove $(snap list | awk ' !/^Name|^core/ {print $1}')
sudo apt remove --purge -y snapd gnome-software-plugin-snap

You can set the update-notifier not to show notifications, either by GUI or by CLI.

CLI

gsettings set com.ubuntu.update-notifier no-show-notifications true

GUI

Open the program dconf-editor and navigate to

"com->ubuntu->update-notifier" and toggle the switch for "no-show-notifications"

enter image description here

2
  • Will this actually stop checking?
    – vidarlo
    May 1 '19 at 19:11
  • 1
    No it does not stop the checking :( It only stops the notifications, which drive me up a tree! I missed that about the question, for some reason. But I have removed unattended-upgrades and disabled apt-daily-service, and apt-daily-update and their timers. I also set the automatic checks to "Never" in software&updates - even with all this, something is still checking. May 1 '19 at 19:14
1

Uninstalling update-notifier should take care of the notices.

sudo apt remove update-notifier update-notifier-common
4
  • Did you test this on a VM? When I propose this to my system, it indicates that it will also remove ubuntu-desktop ubuntu-desktop-minimal ubuntu-release-upgrader-gtk update-manager update-notifier vanilla-gnome-desktop May 1 '19 at 18:53
  • No, I didn't test it. All of those are either related to updates notification or meta packages, and will not remove any core functionality.
    – vidarlo
    May 1 '19 at 18:56
  • K - it removes the meta packages and sets the package dependencies to being manually installed? So the only thing an op would miss would be if the ubuntu-desktop had some packages added to it in a future upgrade? May 1 '19 at 19:06
  • I had downvoted your answer, but I find that to remove the vote, I must perform a nominal edit to your question. Sorry about that! May 1 '19 at 19:06

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.