-
-
Save therevoman/63b17630c04aab1f5d989ce18336be6b to your computer and use it in GitHub Desktop.
Delete ZFS snapshots from dataset one-liner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| zfs list -r -H -t snapshot -o name stream/lxc/stash | xargs -n1 zfs destroy |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I like that one (to be selective, I have 3 pools on my pc):
zfs list -r -H -t snapshot -o name | grep <poolname/whatever> | xargs -n1 zfs destroy
zfs destroy -rvn dataset_or_zvol_name@%
remove -n to actually run.