truestuff/zfs_prune_all_snapshots

6 lines
161 B
Plaintext
Raw Permalink Normal View History

2023-11-09 03:57:36 +00:00
#! /usr/bin/env bash
DO="${DO:-echo}"
printf "%s\n" "${@}" | xargs -rn1 zfs list -r -t snapshot -Ho name -s creation -s name | xargs -rn1 ${DO} zfs destroy -v