ZFS Prune Snapshots =================== Remove snapshots from one or more zpools that match given criteria Examples -------- Remove snapshots older than a week across all zpools zfs-prune-snapshots 1w Same as above, but with increased verbosity and without actually deleting any snapshots (dry-run) zfs-prune-snapshots -vn 1w Remove snapshots older than 3 weeks on tank1 and tank2/backup. Note that this script will recurse through *all* of tank1 and *all* datasets below tank2/backup zfs-prune-snapshots 3w tank1 tank2/backup Remove snapshots older than a month on the zones pool that start with the string "autosnap_" zfs-prune-snapshots -p 'autosnap_' 1M zones Remove snapshots older than two months on the tank pool that end with the string "_frequent" zfs-prune-snapshots -s '_frequent' 2M tank Remove snapshots older than a month on the zones pool that do not start with the string "autosnap_" zfs-prune-snapshots -i -p 'autosnap_' 1M zones Timespec -------- The first argument denotes how old a snapshot must be for it to be considered for deletion - possible specifiers are - `s` seconds - `m` minutes - `h` hours - `d` days - `w` weeks - `M` months - `y` years Usage ----- usage: zfs-prune-snapshots [-hnliqRvV] [-p ] [-s ]