Freenas delete zfs snaphots


Delete zfs snapshots:

 

First, to find the used snapshot space, run this command:

zfs list -o space


This will give you a detailed readout of your pools and snapshot space used.

Here’s my script to wipe ZFS snap shots, but I am certainly open to suggestion:

zfs list -H -o name -t snapshot | xargs -n1 zfs destroy


Again, caution is needed as this will remove ALL SNAPS from your pools.

If snapshot has dependent clones use ‘-R’

zfs list -H -o name -t snapshot | xargs -n1 zfs destroy -R