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?

2 Answers2

6

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
  • 9,241
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,525