snap folder in /root/

I've just noticed a snap folder in the /root/ directory of a reasonably new server running Ubuntu Server 20.04.1 LTS. It contains a single folder /root/snap/ containing /root/snap/lxd.

I didn't intentionally do that. I wonder whether it should be there and whether I should do anything about it.

There is also a /snap folder that also contains /snap/lxd, etc.

Please advise or direct/point me at documentation that I haven't yet found.

1 Answer

Snaps have been part of Ubuntu Server for a little while and can be quite useful for people who want to make use of the Snap feature set. There are a number of snaps that are logical to keep on an Ubuntu Server installation, too, such as NextCloud and a number of popular VPN tools. This allows for the software to always remain up to date without being babysat by an administrator. This can be particularly useful for people who want to "set and forget" while still benefitting from new security updates.

Fortunately, if you do not need or want your Ubuntu Server to use snaps, you can remove snapd without consequences.

sudo apt remove snapd

One thing you will want to check beforehand is that you're not using any OpenVPN tools that run as a snap. You can do this with:

snap list

This is what people will see with a fresh Ubuntu Server 20.04.1 installation on Amazon:

Name Version Rev Tracking Publisher Notes
amazon-ssm-agent 3.0.161.0 2997 latest/stable/… aws✓ classic
core 16-2.48 10578 latest/stable canonical✓ core
core18 20201210 1949 latest/stable canonical✓ base
lxd 4.0.4 18152 4.0/stable/… canonical✓ -

So long as nothing in that list is necessary, feel free to remove it. If you change your mind later, simply:

sudo apt install snapd

Hope this answers your question.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like