Skip to content

Instantly share code, notes, and snippets.

@carepack
Forked from RLovelett/delete.sh
Created July 9, 2020 10:30
Show Gist options
  • Save carepack/8ed53359ef88d2e61c6215a937532e4d to your computer and use it in GitHub Desktop.
Save carepack/8ed53359ef88d2e61c6215a937532e4d to your computer and use it in GitHub Desktop.
Delete ZFS snapshots from dataset one-liner
zfs list -r -H -t snapshot -o name stream/lxc/stash | xargs -n1 zfs destroy
@carepack
Copy link
Author

carepack commented Jul 9, 2020

zfs destroy -rvn dataset_or_zvol_name@%
remove -n to actually run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment