Indeed, according to the answer of this post, all the configuration
files of my snaps should be in the snap folder stored in home while
there should only be mount points in the one stored in root. However,
it seems to be the other way round [...].
This point is correct, but you're neglecting the fact that du
doesn't care that something is mounted there. You asked it to tell you how big the files are in a specific location, and it told you. Check the output of the mount
command and you'll notice that nearly everything in the /snap
directory is just a mount point. Everything else in there is just a symlink. What you're seeing is correct, don't worry! You don't want to swap anything.
Q2: I also have a folder snapd in /var/lib which is 7gb. Is this normal?
Yes, this is where the individual snaps are stored (from where they're mounted into /snap/
somewhere). This is normal.
Q3: I noticed that two versions of each snap are stored: can I safely remove the older ones to save space?
You may; the reason snapd keeps old snaps around is in case you need to revert to an older one. You can see them all with snap list <snap name> --all
. If you're confident you don't need old revisions, you can remove them using sudo snap remove <snap name> --revision=<snap revision>
. Note that you can change the snapd configuration to retain a different number of snaps:
$ snap set system refresh.retain=<number>
lsblk | grep snap
? I think you will see that all the mounted snaps reside in the/snap
folder and not the~/snap
folder. From looking at your pics, your folders seem to be correct. The size of thesnapd
depends on how many snaps you have installed. – Terrance Dec 28 '20 at 01:49