published on
tags: linux zfs

delete zfs snapshots

Oneliner which lists all snapshots of a dataset, discards those which match against grep an feeds the remaining ones to zfs destroy command

zfs list -o space -t snap -r zstore/homes/martin | cut -d" " -f1 | grep -v NAME | grep -v frequent | xargs -n 1 -t zfs destroy