0

I am trying to get snap off of my Arch system and I think it is mostly gone, however, when I do lsblk I get the following:

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0         7:0    0  32.3M  1 loop /var/lib/snapd/snap/snapd/12159
                                      /var/lib/snapd/snap/snapd/12159
loop1         7:1    0  99.4M  1 loop /var/lib/snapd/snap/core/11187
                                      /var/lib/snapd/snap/core/11187
loop2         7:2    0  32.3M  1 loop /var/lib/snapd/snap/snapd/12398
                                      /var/lib/snapd/snap/snapd/12398
loop3         7:3    0  99.4M  1 loop /var/lib/snapd/snap/core/11316
                                      /var/lib/snapd/snap/core/11316
sda           8:0    1  14.4G  0 disk
└─sda1        8:1    1  14.4G  0 part
sr0          11:0    1 731.6M  0 rom
nvme0n1     259:0    0 476.9G  0 disk
├─nvme0n1p1 259:1    0   550M  0 part /boot
├─nvme0n1p2 259:2    0    32G  0 part [SWAP]
└─nvme0n1p3 259:3    0 444.4G  0 part /var/lib/snapd/snap
                                      /

So obviously there is still an issue in that we have "loops" (whatever that is) that are snap related and also there is a partition on my main drive that seems to have been created by snap. I don't really understand what this partition even is because it lists BOTH root ("/") and "/var/lib/snapd/snap". How can a partition be two different things?

In any case how do I nuke this snap stuff?

2 Answers 2

1

The problem was that I removed the modules for snap but not the underlying snapd daemon. Once I removed that, the blk devices disappeared.

Don't forget to update your system after you get rid of snap.

1
  • 1
    Good point. I forget snap and snapd are separate. Snap is just the tool to talk to snapd which does the actual work.
    – user10489
    Mar 12, 2023 at 17:14
1

Snapd uses virtual filesystem images (of type squashfs) to package applications. (df -T should show the type, df -a -F squashfs should list them all.) The loop devices map files (which contain filesystem images) to block devices so these filesystems can be mounted as if they were real disks.

It is unlikely that a "partition" on your main drive is related to this. More likely this is a bind mount, which allows remapping part of a mounted filesystem at a different path.

If you successfully removed snap, then it is likely rebooting will clear all of these mounts. If you stopped snapd before removing it, or removed the individual snaps first, then these might have been cleared automatically. It would be possible to remove them manually, but likely rebooting is much easier, and an effective way to see if you permanently removed snapd.

2
  • I did reboot and the excerpt from the question shows the result of lsblk after the reboot. The problem was that I had not removed snapd (as opposed to just snap). Mar 12, 2023 at 16:33
  • Note that the loop devices won't go away -- they just shouldn't be attached to anything or mounted once snapd is not using them.
    – user10489
    Mar 12, 2023 at 17:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .