# org delete scratch

Delete a scratch org.

## Description for org delete scratch

Salesforce CLI marks the org for deletion in the Dev Hub org and then deletes all local references to the org from your computer.

Specify a scratch org with either the username or the alias you gave the scratch org when you created it. Run "sf org list" to view all your orgs, including scratch orgs, and their aliases.

## Aliases for org delete scratch

`env:delete:scratch`

## Flags

| Flag Name (Long) | Flag Name (Short) | Description                                                                                                                                         |
| ---------------- | ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--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.                                                                             |
| `--target-org`   | `-o`              | **Type:** Value<br>**Required**<br><br>Username or alias of the target org. Not required if the `target-org` configuration variable is already set. |

## Examples for org delete scratch

Delete a scratch org with alias my-scratch-org:

```shell
sf org delete scratch --target-org my-scratch-org
```

Specify a username instead of an alias:

```shell
sf org delete scratch --target-org test-123456-abcdefg@example.com
```

Delete the scratch org without prompting to confirm :

```shell
sf org delete scratch --target-org my-scratch-org --no-prompt
```
