How to clean up local storage (zfs loopback mounted filesystem)

I’m going to use a remote lxd exclusively for my lxd-client, so I set my default remote lxc remote set-default to that remote endpoint, things work fine, so far so good. I’m not sure why I’ve never run this way before, it works way nicer for my use case.

anyway I’d also like to remove/cleanup my local storage, since my zfs loopback FS is taking up 17G of storage (since you can’t shrink ZFS). How do I delete this correctly?

dpb@bierstadt:~[]$ sudo ls -l /var/snap/lxd/common/lxd/disks
total 18489396
-rw------- 1 root root 19327352832 May 15 21:29 default.img
-rw------- 1 root root 19327352832 Apr 17 05:46 juju-btrfs.img
-rw------- 1 root root 19327352832 May 15 21:27 juju-zfs.img

Delete all your containers using the local remote, then edit any profile you have with lxc profile edit to remove any references to those storage pools. Remove all images that you see in lxc image list.

At that point lxc storage list should show 0 users for all 3 pools, at which point lxc storage delete will let you remove them.

Excellent, thanks. Other commands that helped were lxc storage info local:<pool> which showed consumers very helpfully.