ZFS Listing Snapshots

ZFS Listing Pools

ZFS has been amazing - the ability to snapshot, rollback, clone and create incremental updates is amazing!

When you're using ZFS, you may want to look at and sort your snapshots. But first, you may need to know what pools you have zpool list.

zpool list

ZFS Listing Datasets

Once you know the pool you want see the datasets - well that's just zfs list rpool (or bpool, but if you're using ZFS on Ubuntu 22.04 you probably are more interested in rpool).

ZFS Listing Snapshots

ZFS allows you to select what entity types you'd like returned with the -t flag. By passing -t snapshot you list ZFS snapshots.

For example, zfs list  -t snapshot -r rpool

Further, you can sort the snapshots by, say, name with zfs list  -t snapshot -s name -r rpool

If you have tens of thousands of snapshots (trust me, it happens) you might want to limit the fields that are returned (for instance, if you have hundreds of thousands of snapshots it might take minutes for your OS to calculate the available and used space of all snapshots.

So - you can speed up listing the snapshots by only returning the name of the snapshot (with the -o name option).

zfs list  -t snapshot -o name -s name -r rpool

Find the dataset with the most snapshots

If you want to find datasets with the most snapshots, see my post here:

ZFS Finding Datasets with the most snapshots
Following up on Removing old ZFS snapshots, I had way too many snapshots... These commands will find all snapshots within the pool tank and count them by dataset.