10

I run apt update and upgrade every week, yet I keep getting a nag screen from the software updater. How do I disable this notification?

Or does apt not update and upgrade everything installed on my system?

  • apt update updates your software repository lists (so your system knows what software is available). apt upgrade upgrades packages from that list within certain limitations, so NO it doesn't upgrade all packages. It allows you to delay reboots etc. until you decide to allow kernel or version bump changes when you choose to perform apt dist-upgrade or apt full-upgrade. See man apt for more details. – guiverc Feb 10 '19 at 22:18

3 Answers3

12

I assume that you opened the program "Software & Updates", looked at the Updates tab, and choose "Never" for "Automatically check for updates"? This cut the frequency down for me, but I also had to disable the apt daily services:

In a terminal enter the commands

sudo systemctl disable apt-daily.service apt-daily-upgrade.service
sudo systemctl disable apt-daily.timer apt-daily-upgrade.timer
sudo systemctl stop apt-daily.timer apt-daily-upgrade.timer

Your manual updates (sudo apt update & sudo apt upgrade) will work as normal, but the apt system will not automatically look about for new updates.

PolyTekPatrick
  • 278
  • 3
  • 6
Charles Green
  • 21,339
  • 1
    Yes, the Updates tab had "Never" selected for "Automatically check for updates". I did those shell commands yesterday. This morning, I got the update nag screen. Ugh. – raisinbottom Feb 11 '19 at 12:50
  • @raisinbottom I'm guessing it worked as intended after a reboot, but without a reboot I think you needed to stop the timers. I submitted an edit. – PolyTekPatrick May 20 '22 at 19:44
2

apt remove packagekit

This one line should do the trick:

$ sudo apt remove packagekit
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  appstream apt-config-icons fwupd fwupd-amd64-signed gnome-software-common irqbalance libappstream-glib8 libappstream4 libfwupd2
  libgcab-1.0-0 libsmbios-c2 libtss2-esys0 libtss2-udev libxmlb1 runit-helper tpm2-abrmd tpm2-tools
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  gnome-core* gnome-software* gstreamer1.0-packagekit* packagekit* packagekit-tools* task-gnome-desktop*
0 upgraded, 0 newly installed, 6 to remove and 2 not upgraded.
After this operation, 5,788 kB disk space will be freed.
Do you want to continue? [Y/n] y

That is all you need.

Discussion

If you're getting annoying software update nag messages, most likely you have Gnome installed. Gnome has its own special utility for installing packages (gnome-software) and its own package management system (packagekit). I've found Gnome's package tools vastly inferior to the traditional apt update && apt upgrade, but I can see how the graphical interface might make someone new to UNIX feel more comfortable. (Plus, some people are used to being nagged and told to do things: *"Updates available." "Now, you must reboot your computer for no good reason." "Updates available." "Busy doing work? You have to reboot to install these updates." "Updates available...")

However, since you stated that you use command line apt, there's really no reason for you to have packagekit running at all.

Ľubuntu, la différence

Lubuntu (the LXQt Desktop version of Ubuntu) used to not have this problem, but it now comes with packagekit pre-installed, the same as the default GNOME Desktop. Well, almost the same. According to @Juergen in the comments, Lubuntu maintains its distinction from standard Ubuntu in that it requires a different command to disable the silliness:

 sudo apt remove lubuntu-update-notifier

Unattended upgrades

I suggest also installing unattended-upgrades:

apt install unattended-upgrades

This will download and install security upgrades every night. (Or, you can configure it to install all upgrades.) This is important because, without PackageKit, you will no longer have "Automatic Updates" running. In fact, you won't have Gnome Update Manager at all.

A bit more about packagekit

By the way, technically, packagekit is a "meta" layer which sits atop other package managers, such as rpm. Theoretically, it could offer everything apt does and more, but in reality it appears limited to the lowest-common denominator; the least you can find in any package management system. Hopefully it will get better, but as of 2021, it is seriously deficient.

The main reason I used to give to people for using PackageKit was the easy graphical interface for finding programs. Unfortunately, the Gnome Software search function often omits many packages. I know they are available, because I can easily apt search and apt install them from the command line.

hackerb9
  • 2,186
  • 15
  • 13
  • Evan after a successful apt-get remove packagekit, I continue to receive annoying Update Notifier popups, at least on lubuntu 20.04. – Juergen Sep 09 '21 at 18:54
  • I remember l’ubuntu as being more lightweight than GNOME, but I guess with the transition to LXQt they're catching up. https://manual.lubuntu.me/stable/4/4.4/Update-Notifier.html – hackerb9 Sep 11 '21 at 22:09
  • 1
    Catching up seems to impose lubuntu is getting closer to ubuntu, which should make your solution more likely to work. But it doesn't work there, so it looks like lubuntu is still different from ubuntu on that matter. The link to the update notifier docs did not help me to find a solution to disable it, but seems I was successful with apt-get remove lubuntu-update-notifier on lubuntu 20.04. – Juergen Oct 08 '21 at 12:10
  • Thanks, Juergen, I've added your solution. – hackerb9 Oct 09 '21 at 04:04
0

apt update updates your software repository lists (so your system knows what software is available).

apt upgrade upgrades packages from that list within certain limitations, so NO it doesn't upgrade all packages. It allows you to delay reboots etc. until you decide to allow the upgrades that may force changes affecting the stability of currently running software/system, allowing you to choose when these are applied using apt full-upgrade

from man apt

   upgrade (apt-get(8))
       upgrade is used to install available upgrades of all packages currently installed on
       the system from the sources configured via sources.list(5). New packages will be
       installed if required to statisfy dependencies, but existing packages will never be
       removed. If an upgrade for a package requires the remove of an installed package the
       upgrade for this package isn't performed.

full-upgrade (apt-get(8)) full-upgrade performs the function of upgrade but will remove currently installed packages if this is needed to upgrade the system as a whole.

Charles Green's answer covers the nag screens, I've chosen to cover only the 'upgrade' part of your question.

guiverc
  • 30,396