If you want to remove a snapd (e.g if you don't want to use it) from system completely - the only sudo eopkg rmf snapd
doesn't help. After this, the /snap
, /var/lib/snap
will be still existing in a system and will be mounting a snaps in /dev/loop
on the boot.
Instead, you should bring a some manual interventions:
- 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. snapd is removed. You're perfect.