12

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.

slm
  • 3,035

1 Answers1

7

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.

mook765
  • 15,925
  • That clears some things up. Follow up, so when I run sudo apt-get remove or sudo apt-get purge , will that remove the files in both snap directories? – user3138170 Apr 07 '19 at 19:14
  • snaps are not managed with the apt-command, to remove a snap, use sudo snap remove snapname instead. The files in your home directory will not get removed automatically, this has to be done manually. – mook765 Apr 07 '19 at 19:28