+#!/bin/bash
+
+# Author: Alan Pippin
+# Description: This script will remove all snaps containing a given snapshot pattern
+# across all filesystems on a given pool.
+# Usage: zfs-rm-all-snaps <pool> <snapshot pattern>
+
+# source our configuration
+config="${0%/*}/zfs-scripts.conf"
+[ -e "${config}.dist" ] && . ${config}.dist
+[ -e "${config}" ] && . ${config}
+
+# command line arg parsing
+zfs_pool=$1
+snap_pattern=$2
+
+if [[ -z "$zfs_pool" ]] || [[ -z "$snap_pattern" ]]; then
+ echo "Usage: $0 <pool> <snapshot pattern>"
+ exit 1
+fi
+
+echo "-> Deleting all snapshots on pool '$zfs_pool' with pattern '$snap_pattern'"
+for snap in `zfs list -t snapshot 2>/dev/null | grep "^$zfs_pool" | grep "$snap_pattern" | awk '{print $1}'`; do
+ echo " removing snapshot: $snap"
+done
+
+echo -e "\n<Press Enter to execute removal, CTL-C to abort>";
+read
+
+for snap in `zfs list -t snapshot 2>/dev/null | grep "^$zfs_pool" | grep "$snap_pattern" | awk '{print $1}'`; do
+ zfs destroy "$snap" 2>/dev/null
+done
+
+echo "-> Snapshots removed"
\ No newline at end of file