Score:-1

What just screwed up my Ubuntu, and how do I avoid it in future and/or disable absolutely all updates?

us flag

Note that this is one of those specific questions where I'm not looking for helpful advice that tries to figure out why I'm asking this question and what I actually want to do. I'm asking a very specific question...

I had an Ubuntu 18.XX mini-pc; I set this up years ago. Recently I pretty much only used Firefox, Chrome, and LibreOffice on it. The machine became sluggish, and top showed "snapd" using 3/4 cores. I disabled snapd.service via systemctl (semi-related, I hate snaps with passion). That wasn't enough, gnome-shell and everything else crashed with out of memory. Before it crashed the only thing I remember from top were a bunch of kworkers, but sadly I didn't look at memory, only CPU.

On reboot, the machine is so slow I cannot even get to the terminal before everything crashes in the same way. I also cannot get into recovery mode even if I mash shift because the window between bios and boot is too short, I guess, or maybe something else is broken.

  1. What was that? Any known specific exciting update that would do this? I was assuming on 18 I am safe from snaps. How do I make sure, once I reinstall, that I never hit this situation in the future? I will disable and remove snapd, but I wonder if that is enough.

  2. I general, I thought I disabled automatic updates, but I guess I missed something. I want the software state to be about as updateable as a bug in a piece of amber, unless I choose to update it (making full backup just before). How do I disable absolutely all automatic updates?

pl flag
Do you have any swap space configured on this system?
Sergey avatar
us flag
1Gb of swap for 4Gb of RAM. Is this relevant? Nothing on this machine needs this much RAM by far
Score:3
sa flag

Disable automatic upgrades by editing /etc/apt/apt.conf.d/20auto-upgrades and setting the values of APT::Periodic::Update-Package-Lists and APT::Periodic::Unattended-Upgrade to 0 (0=disable). Warning: This will make Ubuntu as updateable as a bug in a piece of amber, unless you choose to update it. Most Ubuntu users would be happier if they didn't disable automatic security updates.

Open /etc/apt/apt.conf.d/20auto-upgrades for editing in nano text editor.

sudo nano /etc/apt/apt.conf.d/20auto-upgrades

Find these two lines:

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";

Replace "1" with "0" in both lines (0=disable).

APT::Periodic::Update-Package-Lists "0";
APT::Periodic::Unattended-Upgrade "0";

The instructions for using nano editor are always found at the bottom of every page. The only two nano keyboard shortcuts that you need to know are for WriteOut and Exit. Press the keyboard combination Ctrl+O and after that press Enter to save the file being edited. Press the keyboard combination Ctrl+X to exit nano.

That disables unattended upgrades to apt packages. To disable unattended upgrades to snap packages uninstall the snapd package with sudo apt remove snapd. The snapd package contains a daemon and tooling that enables snap packages.

Score:1
us flag

Update: not very climatic, I guess

  1. I was able to get into recovery by HOLDING Shift during boot :)
  2. Somehow, stopping/disabling snapd from the dying system didn't "stick"; it was still on. Doing the same and uninstalling it via recovery resolved the issue.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.