Cannot delete juju-zfs

I want to delete juju-zfs storage in lxd and I have no image/instance or volume left which is using this storage backend. I already have remove the controller which was using this storage. All the zfs pool/datasets are also empthy manually.

zfs storage list

|   NAME   | DRIVER |                   SOURCE                    | DESCRIPTION | USED BY |  STATE  |
| default  | zfs    | /var/snap/lxd/common/lxd/disks/default.img  |             | 1       | CREATED |
| juju-zfs | zfs    | /var/snap/lxd/common/lxd/disks/juju-zfs.img |             | 0       | CREATED |

What am I missing?

lxc storage delete juju-zfs

I forgot to mention the output:

Error: Failed to remove directory “/var/snap/lxd/common/lxd/storage-pools/juju-zfs”: remove /var/snap/lxd/common/lxd/storage-pools/juju-zfs: directory not empty

Just out of curiosity I did snap remove lxd --purge and all those files in storage-pools created by juju are gone now. I just do not want to remove lxd to remove these files created by juju.

I suppose, you have deleted zfs pool using zfs command not lxd (I mean lxc command), I dont have juju experience but, you can delete unnecessary zfs storage from database as well.

lxd sql global 'select * from storage_pools;'
lxd sql global 'delete from  storage_pools where id=<juju-zfs_id>;'


Thanks, this sounds like good information to have. Forgot that I can manipulate through lxd internal sql.