Cant delete a template

3 replies
ian.hutchison
2 posts

DESNAP-1: Error while trying to delete template's snapshot. cannot destroy 'antlets/_templates/Hassio_2.12vmdk.kvm@snap': snapshot has dependent clones
use '-R' to destroy the following datasets:
antlets/Hassio

both the following directories are empty but I cant delete them as it says 'Device or resource busy'
/antsle/_templates/Hassio_2.12vmdk.kvm
/antsle/Hassio

Not sure what command I need to run with the '-R' option to fix this

lancem
210 posts

I've gotten that Device or resource busy error and have had to reboot the antsle, then delete the template/antlet.

Former member
edited

Hello Ian,

The command in question is this command:

zfs destroy -R antlets/_templates/Hassio_2.12vmdk.kvm

If that initially does not work, then delete the directory using the following command. Please keep in mind you would have to ssh in the antsle to do such commands. Also know that the reason the template cannot be deleted is because it is being used.

rm -rf /antlets/_templates/Hassio_2.12vmdk.kvm
rm -rf /antlets/Hassio
masroorz
6 posts

@ian-hutchison

Try this

rm -Rfv /antlets/<antlet_name>

zfs destroy -R antlets/<antlet_name>

Log in to reply. New here? It takes a minute.