How long will the Deleted Container under ZFS permenantly removed

After deleting an LXD container in ZFS, the container seems to be moved under /default/deleted/containers/

I assume that this place is kinda like recycle bin so that within certain time, you can still restore from there if needed. As such, the storage space is not released immediately after deleting a container.

My question is how long will it take for a container to permanently removed and its storage space is released if my assumption is not wrong.

It will stay there until nothing references the container. This behavior usually happens when you have copied a container into a new one. So the parent container will only be deleted from ZFS when all children (and their children) are all gone.

1 Like

Thank you!