Archive for July 2008

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