25

I've been running out of memory on some of my small-footprint ubuntu appliances. I noticed that snapd was running and using lots and lots of ram. (I took a chance and stopped the snapd service and things are functioning, but I'm wondering if my machine is going to reboot properly)

What I want to know is, are there core services in a generic install of Ubuntu 16.04 server that require snaps to function?

Also, what are all the services that I need to disable with systemctl to get rid of snapd?

34

snapd is seeded in the default install so as to enable snaps to be installed without further work. However, no part of the base install is a snap (you can verify via snap list, it should return no snaps). Because of this, snapd can be safely removed with no ill side effects:

sudo apt purge snapd

It will probably leave some dependencies lying around. If you want to remove them as well:

sudo apt autoremove
8

Bug #1642068 was logged against this issue and has recently been fixed: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1642068

  • That only happens if you're constantly installing and removing snaps (the bug reported installed/removed a snap every 3 seconds) – Dmitry Grigoryev Feb 1 '17 at 9:11
  • Some of the work involved here was to fix the generic case of snapd's memory utilization, so I believe the fix was wider than the original bug report issue. – Colin Ian King Feb 1 '17 at 9:49
  • 2
    Either way, it seemed like it was using a fairly large chunk of the available ram for something that wasn't doing anything. – Peter Turner Feb 1 '17 at 15:43
  • Indeed. Daemons should be relatively compact and lightweight for sure. – Colin Ian King Feb 1 '17 at 16:08

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.