4

I recently upgraded my web servers from Ubuntu 16.04 to 20.04. I notice that snapd is running and taking a lot of memory. I've read up a bit on the Snap Package Manager and it most of what I read seems to be in the context of a desktop environment. It seems that for a server, apt is still at the core. Do I really need this thing running?

  • Maybe some of this is useful? https://askubuntu.com/q/1317194/1157519 – Levente Mar 15 '21 at 21:57
  • snap list

    Name Version Rev Tracking Publisher Notes core18 20210128 1988 latest/stable canonical* base lxd 4.0.5 19188 4.0/stable/… canonical* - snapd 2.49 11107 latest/stable canonical* snapd

    – Rob Brandt Mar 15 '21 at 22:19
  • Your output seems to clearly answer your question. Are you on track with what that output is telling you about your LXD containers? Next time, please put new information in your question (where it can be formatted), not in comments. Comments are how we help you to improve your question. – user535733 Mar 15 '21 at 22:26
  • Not really. I am not intentionally using any LXD containers, LXD is something I haven't really invested in learning yet. – Rob Brandt Mar 15 '21 at 22:28
  • Suggestion: Uninstall LXD if you are not using it. – user535733 Mar 15 '21 at 22:29

2 Answers2

5

As mentioned, if you do not make use of any snap packages, you may remove the snapd service altogether.

First, run the following to view what snaps have been installed. In this example, you can see that snapd is installed (that's a foundation package), and core18 (also a foundation package). The only actual service is lxd, therefore you decide here whether you have used LXD or not.

$ snap list
Name    Version   Rev    Tracking       Publisher   Notes
core18  20210128  1988   latest/stable  canonical✓  base
lxd     4.0.5     19188  4.0/stable/…   canonical✓  -
snapd   2.48.2.1  11036  latest/stable  canonical✓  snapd

To remove those snaps, you would do it in the following order:

sudo snap remove lxd
sudo snap remove core18
sudo snap remove snapd

Having said that, you mention that you host websites. If that is the case, then you would benefit from using LXD in the first place. With LXD, you create system containers, which are lightweight virtual machines. Being lightweight virtual machines, you can create such a container for a reverse proxy server, and then individual containers for each of your websites. By doing so, each website will be separate from each other. In addition, each container (including the reverse proxy) would be isolated from the host! If all these sound somewhat interesting, you can try it out in action using a guide such as this one, https://www.linode.com/docs/guides/beginners-guide-to-lxd-reverse-proxy/

user4124
  • 8,911
1

No; if you don't plan to install snaps (which is indeed very unlikely on a server), you can safely uninstall snapd.

HuHa
  • 3,385