Ubuntu – What’s the difference between the snap folder in /home/UserName and the snap folder in root (/)

directoryhome-directoryrootsnap

What's the difference between the snap folder in /home/<UserName> and the snap folder in root (/)? I'm trying to get a grasp on where programs and their files are stored when you install them. The first and only program I have installed on my machine is Spotify.

I noticed that there were two spotify folders within two separate snap folders. One in the home directory and one in the root directory.

Questions

  • Why are there two snap folders?
  • Why are there two spotify folders?
  • Are they different in any way (the snap and spotify folders)?

NOTE: I installed Spotify via the Ubuntu Software application, not via the Terminal.

Best Answer

The /snap-directory contains a file named README:

This directory presents installed snap packages.

It has the following structure:

/snap/bin                   - Symlinks to snap applications.
/snap/<snapname>/<revision> - Mountpoint for snap content.
/snap/<snapname>/current    - Symlink to current revision, if enabled.

DISK SPACE USAGE

The disk space consumed by the content under this directory is
minimal as the real snap content never leaves the .snap file.
Snaps are *mounted* rather than unpacked.

For further details please visit
https://forum.snapcraft.io/t/the-snap-directory/2817

To sum it up, this directory contains the mount-points for your snaps and several symlinks which are needed by snapd.

The directory /home/<username>/snap holds the configuration files for your snaps.

Related Question