The answer is different depending on the system:
/var/snap/lxd/common/var/lib/lxcfs is a broken symlink on Noble, but not
on Focal. And: snapd purge+remove works on Noble, but not on Focal. See
below for reproducers.
## NOBLE ##
$ lxc launch ubuntu:noble paride-n
$ lxc exec paride-n bash
root@paride-n:~# lxd init --auto
Installing LXD snap, please be patient.
root@paride-n:~# ls -l /var/snap/lxd/common/var/lib/lxcfs
lrwxrwxrwx 1 root root 35 Dec 3 13:43 /var/snap/lxd/common/var/lib/lxcfs ->
/var/snap/lxd/common/shmounts/lxcfs
root@paride-n:~# ls -l /var/snap/lxd/common/shmounts/lxcfs
ls: cannot access '/var/snap/lxd/common/shmounts/lxcfs': No such file or
directory
root@paride-n:~# apt-get --yes --purge remove snapd
[...]
root@paride-n:~# echo $?
0
^^ Success
## FOCAL ##
$ lxc launch ubuntu:focal paride-f
$lxc exec paride-f bash
root@paride-f:~# lxd init --auto
root@paride-f:~# ls -l /var/snap/lxd/common/var/lib/lxcfs
total 0
dr-xr-xr-x 2 nobody nogroup 0 Dec 3 13:53 proc
dr-xr-xr-x 2 nobody nogroup 0 Dec 3 13:53 sys
root@paride-f:~# apt-get --yes --purge remove snapd
[...]
Removing snap lxd and revision 29619
rm: skipping '/var/snap/lxd/common/var/lib/lxcfs', since it's on a different
device
dpkg: error processing package snapd (--purge):
installed snapd package post-removal script subprocess returned error exit
status 1
dmesg: read kernel buffer failed: Operation not permitted
Errors were
encountered while processing:
snapd
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@paride-f:~# echo $?
100
^^ Fail
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1989603
Title:
Can't purge snapd in LXD: rm: cannot remove
'/var/snap/lxd/common/var/lib/lxcfs/...': Function not implemented
To manage notifications about this bug go to:
https://bugs.launchpad.net/lxd/+bug/1989603/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs