I'm running Ubuntu 16.04. I have a few snaps installed. Looking in the system monitor it looks like there are several versions of each snap installed and that each version is consuming space on the hard drive.

enter image description here

Looking in my home folder it seems like there are just a few empty folders under the ~/snap folder.

enter image description here

But then it seems like the binaries for each snap are actually located under /snap.

So here are my three questions.

  1. What is the system monitor actually showing in terms of space used?
  2. What it ~/snap used for?
  3. What are the /dev/loopX files used for?

I know that there should be only one question in each post but in this case I think the questions are dependent on each other.

  • 1
    /dev/loop* 'files' aren't using disk space but are virtual devices (everything has to be a file in *nix, this accomplishes this using minimal memory & ~no disk space). /snap/* is the actual location of data stored on disk (real files here and not virtual). For loop devices maybe look at en.wikipedia.org/wiki/Loop_device
    – guiverc
    Apr 18, 2018 at 6:21
  • 2
    Possible duplicate of askubuntu.com/questions/834093/…or it may be useful anyway
    – guiverc
    Apr 18, 2018 at 6:24

1 Answer 1

  1. What is the system monitor actually showing in terms of space used?

Snaps are squashfs images that are mounted into place, which is what you're seeing there. They are presented as disks which are 100% full, since each image is only as large as necessary to hold its data.

  1. What it ~/snap used for?

Snaps are (typically) confined, by default limited to a few areas when it comes to reading/writing. ~/snap holds snaps' user data (e.g. config files, etc.) since they can't by default write to $HOME.

  1. What are the /dev/loopX files used for?

Loop devices are what are used to make files accessible as a block device, such as when mounting the snap (squashfs) files. So when you install a snap, it's mounted, and a loop device is used. When a snap is updated, it keeps three revisions around (current and two old ones) in case you want to revert, so these old ones are using loop devices as well.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.