5

Ubuntu might be great and frequent software updates might be very helpful in keeping the system up-to-date and secure. But my problem is,

  1. the software updater is causing my system to freeze and I have to restart the system to frequently.
  2. even if (1) is not correct i.e the updater is not causing the system to freeze, another problem I see is after doing the update it's asking me to restart the system for most of the updates. And if I don't restart, the system is freezing again. And I have to do a restart to over come the system freeze.
  3. even if not for (1) and (2), i am using the system for development activities and so security and frequent updates are not my priority. I have several VM's and docker containers running on the machine, so my priority is the keep the system running for weeks and months with out restarting. And I suspect, software updater is hindering this.

Is there an easy way to disable these update prompts entirely. Please provide your views/answers.

A screenshot of software updater I am referring to is below. enter image description here
This is current least update preference I could set - enter image description here

Edit - Thanks to Roman Riabenko for suggesting to check the links on comments which in turn suggest to check unattended upgrades. But this does not seems to be the case with 20.04.1.

$ cat /etc/apt/apt.conf.d/20auto-upgrades
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "0";

and

$ cat /etc/apt/apt.conf.d/10periodic
APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
APT::Periodic::Unattended-Upgrade "0";
samshers
  • 668
  • 1
  • 8
  • 20
  • Did you try disabling `unattended-upgrades`? https://unix.stackexchange.com/questions/470709/how-do-i-stop-disable-unattended-upgrades-from-being-launched-automatically – Roman Riabenko Sep 27 '20 at 07:49
  • 1
    Is using Debian stable an option? – Roman Riabenko Sep 27 '20 at 07:50
  • 2
    @RomanRiabenko, ` Debian stable an option? ` if there is no means to disable this.. i might want to switch. I can't afford to restart my machine for the sake of upgrades. :-) – samshers Sep 27 '20 at 08:09
  • @RomanRiabenko, plz see edit – samshers Sep 27 '20 at 08:17
  • And what about `/etc/apt/apt.conf.d/10periodic`? https://askubuntu.com/questions/1167314/disable-automatic-updates-ubuntu-18-04 – Roman Riabenko Sep 27 '20 at 08:33
  • Another suggestion is to disable invocation of `update-notifier`: https://askubuntu.com/questions/218755/how-to-disable-the-update-manager-popup/700412#700412 – Roman Riabenko Sep 27 '20 at 08:47
  • @RomanRiabenko everything is zero - plz see edit – samshers Sep 27 '20 at 09:18
  • I can't purge any package like update manager or update notifier as i might need them later or just to leave the system in unwanted state. – samshers Sep 27 '20 at 09:19
  • 2
    I found at least to approaches to disabling update-notifier without removing it. One is to comment out `//` the line in `/etc/apt/apt.conf.d/99update-notifier` as proposed in https://askubuntu.com/questions/218755/how-to-disable-the-update-manager-popup/700412#700412 Another is to disable the cron job: https://askubuntu.com/questions/1167314/disable-automatic-updates-ubuntu-18-04/1237297#1237297 I tested neither. – Roman Riabenko Sep 27 '20 at 09:23
  • will see if i can test them – samshers Sep 27 '20 at 09:24
  • Hello. Did you find a solution that works for you? It would be great if you posted an answer to your question as well as updated your question with what didn't work. – Roman Riabenko Nov 18 '20 at 19:56
  • I as well am having system crashes and hangs from the updater. Also annoyingly, it'll pop up without warning and take focus from me, which as a primary keyboard user means I'll sometimes hit enter or another key and perform an unintended action. I'm testing the comment-out solution offered by Roman Riabenko for now, and if that doesn't work, I'll test the cron job solution. – Caleb Jay Oct 21 '21 at 02:46

1 Answers1

2

You can use this command :

sudo bash -c 'echo "Hidden=true" >> /etc/xdg/autostart/update-notifier.desktop'
  • if it's as simple as you suggested.. i would say +100 to your answer. Did some one (or you) test it ?? – samshers Nov 01 '21 at 16:30
  • the above command, seems to only disable the desktop notification but not the background updates... am i right – samshers Nov 01 '21 at 16:31
  • 1
    Hello. Yes, it just disable Software Updater pop up, but i think it is enough. –  Nov 02 '21 at 19:27
  • You could just delete the /etc/xdg/autostart/update-notifier.desktop file altogether (then update-notifier shouldn't autostart). You can run update-notifier or update-manager manually when you want it, I believe. – Brōtsyorfuzthrāx Sep 24 '22 at 00:17