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?
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), andcore18
(also a foundation package). The only actual service islxd
, therefore you decide here whether you have used LXD or not.To remove those snaps, you would do it in the following order:
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/
No; if you don't plan to install snaps (which is indeed very unlikely on a server), you can safely uninstall snapd.