Since the GUI doesn’t let you pick all items on the current page or mass select snapshots, e.g., delete everything matching the query (which would be really nice), this will do the same thing:
Not to spam my own post, but this is one of those instances where you create a checkpoint before attempting such a command or script, and then remove the checkpoint shortly after you confirm everything went smoothly.
One other random bit of errata about handling large numbers of snapshots:
Snapshot iteration is much faster if you limit yourself to attributes that can be gotten from a simple ZFS handle (e.g. name, createtxg) rather than requesting / parsing timestamps. Iterators in libzfs can handle start and end txgs.