So, why does that happen? Because when a group is created, it might be used by users.
It is not in the purview of the package to deal with group membership and removing users from groups.
When a group gets created, stays created.
I guess I was puzzled why the lxd “group” would be left to exist when lxd itself no longer exists on the system that group would have no more purpose? oh, well
To help with accomplishing what Stephane recommended for completely removing SNAP LXD from a system I found this:
It would seem to accomplish at least the 1st Four steps Stephane recommended?
Right, you’ll effectively want:
lxc list
lxc delete <whatever came from list>
lxc image list
lxc image delete <whatever came from list>
lxc network list
lxc network delete <whatever came from list>
echo ‘{“config”: {}}’ | lxc profile edit default
lxc storage volume list default
lxc storage volume delete default <whatever came from list>
lxc storage delete default
Effectively listing and the deleting all the objects until everything’s clean.
I’ve not tried this python3 script yet but am setting up a VM that I can install SNAP LXD in, create a bunch of containers with some in the RUN state and others in the STOPPED state and will try it out.
If it works it could be a real time saver if you have dozens or hundreds of containers leaving just steps 5-10 to do?
That’s normal, most packages that create groups also don’t remove them.
That’s because you may have filesystem paths or other resources that belong to this group and removing the group from the list would then just cause them to be owned by a numeric gid instead. It would then become a problem when installing another package as that package would get the gid which was used by the previous group, effectively granting access to that piece of software to anything which was leftover from the previous one.