36

Running Ubuntu 18.04 on x64.

I need to COMPLETELY turn off the "automatic updates reminder" stuff on my Ubuntu system. The problem is that the machine is doing some unattended processing and the updates reminders interfere with it.

A while back, I Googled for help on this and got some pointers to go into Software Updater "settings" and set the "Remind me when" thing to "Never". That sorta (but not really) worked. It disables the big screen that comes up (the one that tells you that "We have new software for you"), but not the little one.

Anyway, I could go on more about how that doesn't work, but the point is that it is clear that it really, really wants you to do this and they have made the config hard to work - to really turn it off.

So, I need something lower level - not so "user-y" or "GUI-I" - because that just doesn't work. There has to be something lower level - some service or something that you can kill or disable to make this go away. Can you help me, please?

  • 1
    There are three possible applications that you might be referring to, and it's unclear which you are having a problem with: Update-notifier, update-manager (also known as software-updater), and unattended-upgrades. Please edit your question to more clearly describe the problem that you are encountering. – user535733 Mar 09 '21 at 14:57
  • 2
    I saw a comment to the effect of asking which of the many updaters I am "having a problem with". I just want to turn them all off. Every single darn one of them! – Joe Schmoe Mar 09 '21 at 16:29
  • You "just" want to remove three key elements of your desktop, two of which don't have on/off switches. That approach is unwise: Following through will have consequences. Are you SURE you want to go down that rabbit-hole? There might be simpler, safer solutions...if we knew more about the problem that you are encountering. – user535733 Mar 09 '21 at 16:40
  • Yes, that's what I want to do. I can run apt-get upgrade when I need to. And I don't like the implication that the OS is smarter than I am. Yes, I understand that if I don't like that attitude, then I shouldn't be using Ubuntu, but, what can I say? There are things about it that I do like, and it seems to work well on the hardware on which I have it running. – Joe Schmoe Mar 09 '21 at 16:59
  • 2
    Does this answer your question? How to stop apt from doing anything – N0rbert Mar 09 '21 at 19:55
  • 1
    Well, it looks like there's about a thousand ways of doing this - which makes the whole thing complicated. Lots of panic warnings attached to some of them (of the "Are you sure you really want to go down that rabbit hole?" variety). I'll have to think on this a bit to see which one makes the most sense. Will let y'all know which one I decide to try and what happens as a result. Thanks for all the commentary... – Joe Schmoe Mar 09 '21 at 20:10
  • BTW, I see references below to unattended upgrades. As far as I know, I don't have that (and that's a good thing). As far as I can tell, it never actually does the upgrade by itself; it just nags me to do it. – Joe Schmoe Mar 09 '21 at 20:12

4 Answers4

16

The simplest way to do this would be to disable every auto-upgrade. Here's how you can do it on Ubuntu 18.04 and 20.04:

  1. Open Terminal (if this is an Ubuntu Server installation, just SSH into the thing)
  2. Edit Apt's 20auto-upgrades file to disable everything:
sudo vi /etc/apt/apt.conf.d/20auto-upgrades
  1. Ensure everything is set to 0. If done correctly, you'll have a file that looks like this:
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "0";
  1. Get on with your life

That's really all there is to it. Set everything to zero and all notifications, background checks, and invisible updates will completely disappear. Hopefully whatever system you're doing this to is a VM or something not connected to the open web. Otherwise, you may be creating a new question in a year or two when some script kiddy takes advantage of your unpatched system.

Gábor Héja
  • 105
  • 5
  • 1
    And, disabling snap auto updates? Maybe we can tell OP to remove snapd if they don't need it? – Archisman Panigrahi Mar 09 '21 at 15:29
  • That's outside the scope of the question. Snaps don't remind people to upgrade; they just do. If the OP is seeing a message about updates, it's not from a snap. –  Mar 09 '21 at 15:45
  • 2
    I think you're still going to get annoying popups if you do an apt update and then for your own good reasons don't apt upgrade everything, or when you have to downgrade a package for some reason but Ubuntu knows better than you about the newer version available. – Tavin Dec 08 '21 at 23:14
  • This seems to be the correct answer. It's extremely frustrating when OP's don't bother to follow up on posts like this. Also, the suggestion with the most votes (to uninstall unattended-upgrades) appears to be a bad idea. Run apt-cache rdepends unattended-upgrades to see what packages depend on this package; in particular python3-software-properties. – pgoetz Mar 10 '23 at 14:09
  • 2
    This is a good answer except for the attitude. Obviously updating regularly is critical to running a healthy system but some of us do that when we log on anyway, as part of starting the day. Or sometimes we want to apt update and install something first, and get extremely annoyed when the "E: Could not get lock..." shouts back at us. – AntonOfTheWoods Mar 25 '23 at 02:27
  • This isn't actually correct. The files in /etc/apt/apt.conf.d are lexically sorted, and the last config processed wins; you have to check all files. If you have a later file that sets APT::Periodic::Unattended-Upgrade "7";, for example, that one wins. You can check what the actual status is with apt-config dump. To check if you have unattended upgrades enabled, for example, run apt-config dump APT::Periodic::Unattended-Upgrade. – EML Jan 14 '24 at 16:28
  • @AntonOfTheWoods: attitude is in the eye of the beholder. – EML Jan 14 '24 at 16:29
  • Some advice on what manual updates should be done regularly to stay safe, or at least a mention that they should be done, would be more useful and of better "attitude" than sarcastic admonishments. – Self Dot Feb 10 '24 at 02:10
10
  1. How to uninstall Unattended-Upgrades: sudo apt remove unattended-upgrades

    • WARNING: Uninstalling this package is a bad idea for most users. You will no longer get automatic security patches. Running your Ubuntu system without unattended upgrades is untested -- you may encounter unexpected errors. Running an unpatched Ubuntu system may leave you vulnerable to published exploits. If this is an enterprise or school system, running an unpatched Ubuntu system may violate your network owner's policy.

    Someday, if you change your mind and want to restore automatic security patches: sudo apt install unattended-upgrades


  1. How to uninstall Update-Notifier: sudo apt remove update-notifier

    Update-Notifier includes the small alert icon at the top of your screen and the little dialog that both nag you when upgraded packages are available. They seem small, but they are an important part of the Ubuntu user experience.

    • WARNING: Uninstalling this package is a bad idea for most users. Removing this package will ALSO remove your desktop metapackages (ubuntu-desktop-minimal and ubuntu-desktop). For some (not all) users, removing the desktop metapackages may make their entire desktop stack eligible for autoremoval. The desktop metapackages MUST be reinstalled before you run do-release-upgrade to migrate to the next release of Ubuntu. Don't forget. You have been warned.

    Someday, if you change your mind and want to restore this package: sudo apt install update-notifier


  1. How to uninstall Update-Manager: sudo apt remove update-manager

    Update-Manager includes the large daily/weekly upgrade selection dialog and the release-upgrade graphical frontend.

    • WARNING: Uninstalling this package is a bad idea for most users. Removing this package will ALSO remove your desktop metapackages (ubuntu-desktop-minimal and ubuntu-desktop). For some (not all) users, removing the desktop metapackages may make their entire desktop stack eligible for autoremoval. The desktop metapackages MUST be reinstalled before you run do-release-upgrade to migrate to the next release of Ubuntu. Don't forget. You have been warned.

    Someday, if you change your mind and want to restore this package: sudo apt install update-manager

user535733
  • 62,253
  • I wonder if you could UFW firewall lock update sites, or will Ubuntu go looking for a 'solution for you' and find proxies not blocked, or you could block the processes. – pierrely Mar 10 '21 at 05:15
  • @pierrely perhaps. We don't know what problem the OP is encountering. – user535733 Mar 10 '21 at 13:41
  • 8
    Is it an important part of the Ubuntu user experience to interrupt the user with an annoying popup which they have absolutely no way to reconfigure without most likely causing severe damage to their installation, or wasting some hours developing a hack to silence it? I love Ubuntu and I am trying to say this with respect, and a minimum of snark, but on the other hand this is a fair description of my user experience. – Tavin Dec 08 '21 at 23:11
  • @Tavin this is a rather extreme answer specifically because the OP requested an extreme answer ("COMPLETELY turn off"). There are much simpler and gentler ways to not be reminded to update...the existing update tools let you select (much) less frequent reminders. – user535733 Dec 08 '21 at 23:23
  • 6
    True, but completely disabling the popup reminders is what command-line users such as myself and the OP want. There's no way to do it without hacking your system. – Tavin Dec 12 '21 at 18:06
  • 1
    Well, removing one or two packages doesn't really meet my definition of "hacking" a system. Ubuntu is designed to be a solid general-purpose system suitable for unskilled users who DO need those popups. If you're a skilled user who wants to be responsible, then customize your system (hack away!) Alternately, it's open source code: Feel free to contribute a patch to enable the behavior that you want. Ubuntu improvements are frequenly driven by contributors. – user535733 Dec 13 '21 at 04:20
  • 3
    FYI after uninstalling update-notifier, ubuntu may simply be broken. Doing apt install update-notifier causes errors about broken packages, and nothing gets reinstalled. – Caleb Jay Jan 20 '22 at 07:57
  • Errors about broken packages mean that you have created a different problem in addition to having (unwisely) unwisely uninstalled unattended upgrades. Please open a new question. – user535733 Jan 20 '22 at 13:42
  • Another answer suggests alternatives to steps 2 and 3 that reportedly prevent lock conflicts without the dire consequences predicted here: https://askubuntu.com/a/1006199/80644 – Ray Woodcock Aug 24 '23 at 16:32
  • @RayWoodcock the question here does not ask about lock conflicts, so that;s a bit confusing. There are indeed many ways to accomplish what the OP asked. Specific edit suggestions are welcome. – user535733 Aug 24 '23 at 17:49
0

Looking at the other answers, neither of them seem to address the question. Removing desktop metapackages shouldn't be required to inhibit popup notifications, and just disabling automatic updates means you'll still get a popup when you run apt update manually.

I find this design mis-step in Ubuntu deeply unfortunate.

What I'm currently trying to fix the problem is the following:

#!/usr/bin/env bash

set -euxo pipefail

rm -rf pkg

for pkgname in update-manager update-notifier; do pkg="${PWD}/pkg/${pkgname}" ver=999:999 install -d "${pkg}/DEBIAN" tee "${pkg}/DEBIAN/control" <<EOF >/dev/null Package: ${pkgname} Version: ${ver} Section: gnome Priority: optional Architecture: all Maintainer: Radon Rosborough <radon@intuitiveexplanations.com> Description: Prevent ${pkgname} from being installed EOF

fakeroot dpkg-deb --build &quot;${pkg}&quot; &quot;${pkgname}.deb&quot;
sudo apt install -y &quot;./${pkgname}.deb&quot;

done

This should be effective since it fully uninstalls the undesirable packages, but without messing up anything else since we have replaced them with placeholders instead of removing them normally.

If this doesn't work I will be back with a new idea.

  • "I find this design mis-step in Ubuntu deeply unfortunate." Opinions here have zero impact on the design and development process, since those folks are not here. Participation in design and coding --which you are welcome to do, it's open source-- offers actual opportunity for improvement. – user535733 Feb 24 '23 at 06:34
  • 1
    @user535733 Regarding your first comment asking whether my answer is tested, I am offering an answer that I have implemented on my system but have not yet been able to gather enough data to determine whether it is a full fix for the problem, hence the disclaimer. Regarding your second comment explaining that my opinion is unlikely to have any effect on the Ubuntu design process - thank you, but I was already aware of this fact, and it does not change my point of view. – Resigned June 2023 Feb 25 '23 at 23:43
0

The OP asked

So, I need something lower level - not so "user-y" or "GUI-I" - because that just doesn't work. There has to be something lower level - some service or something that you can kill or disable to make this go away.

The answer is straightforward:

$ sudo dpkg-reconfigure -plow unattended-upgrades

No need to uninstall anything. I have to confess that I have no idea how this affects the GUI/desktop, since I don't use it, but I imagine it stops any popups, since the popups couldn't do anything anyway.

You could manually set the update frequency to 0, as suggested above, but see my comment to that answer: you potentially have to do this in multiple files.

References:

https://github.com/mvo5/unattended-upgrades/blob/master/README.md https://help.ubuntu.com/community/AutomaticSecurityUpdates

EML
  • 268