57

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?

4 Answers4

31

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.

14
  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
  • 68,493
7

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
  • 572
2

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.