Remove all ZFS snapshots

Here’s a small bash script to destroy all existing zfs snapshots.

Run at your own risk!  :-)

#!/bin/bash
for snapshot in `zfs list -H -t snapshot | cut -f 1`
do
zfs destroy $snapshot
done



Related posts:

  1. ZFS: The future of filesystems?


Leave a comment