# package delete

Delete a package.

## Description for package delete

Specify the ID or alias of the package you want to delete.

Delete unlocked and second-generation managed packages. Before you delete a package, first delete all associated package versions.

## Aliases for package delete

`force:package: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`      | `-n`              | **Type:** Boolean<br><br>Don't prompt before deleting the package.                                                                                       |
| `--package`        | `-p`              | **Type:** Value<br>**Required**<br><br>ID (starts with 0Ho) or alias of the package to delete.                                                           |
| `--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 package delete

Delete a package using its alias from your default Dev Hub org:

```shell
sf package delete --package "Your Package Alias"
```

Delete a package using its ID from the specified Dev Hub org:

```shell
sf package delete --package 0Ho... --target-dev-hub devhub@example.com
```
