# org delete snapshot

Delete a scratch org snapshot.

## Description for org delete snapshot

Dev Hub admins can delete any snapshot. Users can delete only their own snapshots, unless a Dev Hub admin gives the user Modify All permission, which works only with the Salesforce license.

## Aliases for org delete snapshot

`force:org:snapshot:delete`

## Flags

| Flag Name (Long)   | Flag Name (Short) | Description                                                                                                                                              |
| ------------------ | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--api-version`    | N/A               | **Type:** Value<br><br>Override the api version used for api requests made by this command                                                               |
| `--flags-dir`      | N/A               | **Type:** Value<br><br>Import flag values from a directory.                                                                                              |
| `--json`           | N/A               | **Type:** Boolean<br><br>Format output as json.                                                                                                          |
| `--no-prompt`      | `-p`              | **Type:** Boolean<br><br>Don't prompt the user to confirm the deletion.                                                                                  |
| `--snapshot`       | `-s`              | **Type:** Value<br>**Required**<br><br>Name or ID of snapshot to delete.<br><br>The IDs of scratch org snapshots start with 0Oo.                         |
| `--target-dev-hub` | `-v`              | **Type:** Value<br>**Required**<br><br>Username or alias of the Dev Hub org. Not required if the `target-dev-hub` configuration variable is already set. |

## Examples for org delete snapshot

Delete a snapshot from the default Dev Hub using the snapshot ID:

```shell
sf org delete snapshot --snapshot 0Oo...
```

Delete a snapshot from the specified Dev Hub using the snapshot name:

```shell
sf org delete snapshot --snapshot BaseSnapshot --target-dev-hub SnapshotDevHub
```
