Information I can't find in the documentation

I have been reading through the docs working on some things for my system. Every bit of software that I have installed onto my system to date has had some kind of instructions on how to install AND how to remove that software. Would someone please show me where I could find the information on how to remove lxd?
TIA

How did you install it in the first place?

I followed the ‘destructions’ for debian systems.

  1. install snapd
  2. snap install lxd

I tried to remove snapd (which ‘should’ remove everything under snapd but . . . )
using # apt remove snapd
followed by . . .

root@debianmemyself# apt purge snapd
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be REMOVED:
snapd*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database … 91577 files and directories currently installed.)
Purging configuration files for snapd (2.21-2+b1) …
Stopping snap-lxd-7412.mount
Removing snap lxd
rm: cannot remove ‘/var/snap/lxd/common/lxd/storage-pools/lxdAA/containers’: Operation not permitted
rm: cannot remove ‘/var/snap/lxd/common/lxd/storage-pools/lxdAA/snapshots’: Operation not permitted
rm: cannot remove ‘/var/snap/lxd/common/lxd/storage-pools/lxdAA/images’: Operation not permitted
rm: cannot remove ‘/var/snap/lxd/common/lxd/storage-pools/lxdAA/custom’: Operation not permitted
dpkg: error processing package snapd (–purge):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
snapd
E: Sub-process /usr/bin/dpkg returned an error code (1)

So I’m back to the question - - - how do I remove lxd?

Did you try removing LXD through snapd first and thereafter remove snapd?

It seems more of an issue (unmounting the LXD containers perhaps) with snapd than LXD and perhaps worth checkin the snapd forum (or whatever support there is).

That’s what I thought as well - - - but - - - - at this point the people at snapd maintain that using $ apt remove snapd and $ apt purge snapd would not only remove snapd but also ‘ALL’ snaps.
As that isn’t happening - - - here at least - - - I’m a asking . . .

Sure, but it might it be a bug in snapd, either general or in partiuclar to LXD, despite what the developers are claiming.

From the snapd it is not clear whether the unmounting of snap-lxd-7412.mount is suceeding or not, but since the errors trails right behind I reckon the unmounting of the LXD containers is failing and causing the error.

You could try apt remove lxd*

Hmmm - - - that didn’t do anything and has the potential to be dangerous here as I’m running lxde for desktop.

I’m wondering if the apparmor inside lxd has locked lxd down - - - but I don’t really know where to look for that stuff as the general apparmor instructions all land up as dead ends.

Thanks for the ideas mate!

apparmor is not ‘inside’ LXD (or part of it) and should not prevent snapd from removing LXD.

Did you then try snap remove lxd, assuming that snapd is still present on the machine?

You bet - - - did that BEFORE trying to remove snapd.

than it would seem to be a bug in snapd and perhaps best discussed with its community/developers.

I am happy to help with any question I can contribute with, but @dabeegmon is messy. For example,

  1. The title of this thread is Information I can’t find in the documentation. It is not descriptive the least.

  2. I asked them to use markdown (formatting) in a previous discussion, and showed him how to use it. He did not make an effort to use markdown, making it difficult to follow the threads.

  3. This thread shows that apt remove --purge lxd attempts to remove resources of the LXD snap. It’s weird how one would go into such a corner case. But the thing is, would I eventually be able to extract instructions on how to replicate? Perhaps not likely.

I am happy to help with any question I can contribute with, but @dabeegmon is messy. For example,

The title of this thread is Information I can’t find in the documentation. It is not descriptive the least.

So what did you want to see - - - something like - - - - impossible to remove lxd from system - - - would that be preferable? - - - I thought that this way it was far softer so that feelings don’t get injured.

I asked them to use markdown (formatting) in a previous discussion, and showed him how to use it. He >did not make an effort to use markdown, making it difficult to follow the threads.

I spent some time looking for documentation on how to use this ‘markdown’ couldn’t find anything that makes sense. You live on here and likely have an information sheet on how to do the various formatting items - - - well I don’t and couldn’t find one so maybe you might offer such a cheatsheet rather than just telling me that I should just ‘do it’.

This thread shows that apt remove --purge lxd attempts to remove resources of the LXD snap. It’s weird >how one would go into such a corner case. But the thing is, would I eventually be able to extract >instructions on how to replicate? Perhaps not likely.

Really simple actually - - -I have been working on this on my test system where I can experiment without finding everything else that I need wrecked because of working on some other software.

Replication:

  1. install a debian stable (buster) system
  2. install snapd using $ apt install snapd
  3. install lxd using $ snap install lxd
  4. mess around with lxd init
  5. use $ snap remove lxd
  6. $ apt remove snapd
  7. $ apt purge snapd
  8. Examine - - - - are lxd storage pools all removed?
  9. If yes I have a big problem. If no - - - well you have the problem.

Hopefully the above is straight forward enough.