Ubuntu: Is the /snap/core folder needed?



Question:

Ubuntu 16.04 - has a /snap/core folder with subfolders of revisions. Do I need the /snap folder at all?

Can I just remove it (and how)?


Solution:1

The /snap folder isn't a traditional folder full of files. So you don't really delete the contents of that folder and get space back (if that's what you're expecting). This folder is used when snaps are installed. If for example you installed the Spotify snap then you'd end up with a /var/lib/snapd/snaps/spotify_6.snap file which contains the compressed application and libraries. This gets mounted under /snap/spotify/6 and symlinked as /snap/spotify/current.

The files haven't been uncompressed to that directory, they're just mounted and read at runtime. You can see this with mount | grep spotify, like this:-

/var/lib/snapd/snaps/spotify_6.snap on /snap/spotify/6 type squashfs (ro,nodev,relatime)

The same goes for the core runtime snap, which lives in the same location, and is mounted in a similar way. By default on a clean install of Ubuntu there are no snaps installed, even core. However as soon as you install a snap, you get the core snap pulled in, which contains the runtime low level dependencies needed by all snaps.

While you could unmount the directory and delete the core snap, you'd break all install snaps doing this, and the system will make it hard for you to do that as a result.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »