zfs.resource.snapshot.destroy ============================= Destroy ZFS snapshots. A validation error is raised when: - the snapshot does not exist (``ENOENT``) - it has dependent clones and ``defer`` is ``false`` (``EBUSY``) - it has active holds (``EBUSY``) - a protected path is targeted without ``bypass`` (``EACCES``) Examples: Destroy a single snapshot: .. code:: json {"path": "tank/data@backup"} Destroy matching snapshots in child datasets: .. code:: json {"path": "tank@backup", "recursive": true} Defer destruction if the snapshot is in use: .. code:: json {"path": "tank/data@snap", "defer": true} Destroy all snapshots of a dataset: .. code:: json {"path": "tank/data", "all_snapshots": true} Destroy all snapshots of a dataset and its children: .. code:: json {"path": "tank", "all_snapshots": true, "recursive": true} .. raw:: html
Type: object

Type: array
No Additional Items

Tuple Validation

Parameter 1: data

data

Type: object

Destroy parameters for removing ZFS snapshots.

No Additional Properties

Path

Type: string

Path to destroy. Either a snapshot path (e.g., 'pool/dataset@snapshot') or a dataset path when all_snapshots=True (e.g., 'pool/dataset').

Must be at least 1 characters long

Recursive

Type: boolean Default: false

Recursively destroy matching snapshots in child datasets.

All Snapshots

Type: boolean Default: false

If True, path should be a dataset path and all its snapshots will be destroyed.

Defer

Type: boolean Default: false

Defer destruction if snapshot is in use (e.g., has clones).

Result

Type: null


*Required roles:* SNAPSHOT_DELETE