You can determine the list of all installed snaps with snap list
, for relation between mount-point and snap name you can use systemctl status
, mount
and losetup
.
For example on my Ubuntu MATE 18.04 LTS I have the following snaps installed:
$ snap list
Name Version Rev Tracking Developer Notes
core 16-2.33.1 4917 stable canonical core
software-boutique 18.04.0-5b99b84 31 stable/… flexiondotorg classic
ubuntu-mate-welcome 17.10.23-e4f4c4c 169 stable/… flexiondotorg classic
They create loop-devices as follows:
$ systemd-analyze blame | grep dev-loop
4.303s dev-loop4.device
4.267s dev-loop2.device
4.193s dev-loop0.device
4.146s dev-loop3.device
111ms dev-loop5.device
Mount points are as following:
$ mount | grep snapd
/var/lib/snapd/snaps/core_4830.snap on /snap/core/4830 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/ubuntu-mate-welcome_169.snap on /snap/ubuntu-mate-welcome/169 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/software-boutique_31.snap on /snap/software-boutique/31 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core_4650.snap on /snap/core/4650 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core_4917.snap on /snap/core/4917 type squashfs (ro,nodev,relatime,x-gdu.hide)
Let's look closer to dev-loop4.device
:
$ systemctl status dev-loop4.device
● dev-loop4.device - /dev/loop4
Follow: unit currently follows state of sys-devices-virtual-block-loop4.device
Loaded: loaded
Active: active (plugged) since Tue 2018-07-17 13:05:41 MSK; 4min 44s ago
Device: /sys/devices/virtual/block/loop4
The folder /sys/devices/virtual/block/loop4
contains very useful file loop/backing_file
, we can read its contents:
$ cat /sys/devices/virtual/block/loop4/loop/backing_file
/var/lib/snapd/snaps/core_4650.snap
So we just determined that /dev/loop4
is created by core
snap.
But the easiest way is to use losetup
(see man losetup
):
$ losetup
NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE DIO LOG-SEC
/dev/loop4 0 0 1 1 /var/lib/snapd/snaps/core_4650.snap 0 512
/dev/loop2 0 0 1 1 /var/lib/snapd/snaps/ubuntu-mate-welcome_169.snap 0 512
/dev/loop0 0 0 1 1 /var/lib/snapd/snaps/core_4830.snap 0 512
/dev/loop5 0 0 1 1 /var/lib/snapd/snaps/core_4917.snap 0 512
/dev/loop3 0 0 1 1 /var/lib/snapd/snaps/software-boutique_31.snap 0 512
Hope this helps to understand Snaps mount-points better.
Bottom-line: by using Snaps for having up-to-date software, we end up paying for it with higher network traffic, more disk usage and slower boot time. If you do not want to use Snaps at all, then remove them with sudo apt-get purge snapd
.