Antoine
I've noticed the same and did not understand all the different loops either. I came across this thread which helped me understand more of it, including the removal of residual files/directories.
In particular this reply by @Dentraq
- Check list of installed snaps:
sudo snap list --all
- Remove all of installed snaps:
sudo snap remove snapname
(for core snap also use a --revision revision_number option)
- Remove a snapd by
sudo eopkg rmf snapd
- List all /dev/loop devices currently mounted by snap:
sudo mount | grep snap | awk '{print $3}'
- Unmount this devices by
sudo umount device_name
- Remove snap directory:
sudo rm -rf /var/lib/snap && sudo rm -rf /snap
- Remove all files that used to mount a snap packages from /var/lib/snapd/snaps to /snap on the boot:
sudo find /etc/systemd/system -name "snap-*.mount" -delete
sudo find /etc/systemd/system -name "snap.*.service" -delete
sudo find /etc/systemd/system/multi-user.target.wants -name "snap-*.mount" -delete
sudo find /etc/systemd/system/multi-user.target.wants -name "snap.*.service" -delete
- Reboot, and that's all. You're perfect.