# aspire secret delete command

## Name

`aspire secret delete` - Delete a secret.

## Synopsis

```bash title="Aspire CLI"
aspire secret delete <key> [options]
```

## Description

The `aspire secret delete` command deletes a user secret from the secrets store for an Aspire AppHost.

<Include relativePath="reference/cli/includes/project-search-logic-description.md" />

The command returns the following exit codes:

- `0`—The command succeeded.
- `3`—Failed to find the AppHost project.
- `4`—The specified secret key was not found.

## Arguments

The following arguments are available:

- **`key`**

  The secret key to delete.

## Options

The following options are available:

- **`--apphost <apphost>`**

  The path to the Aspire AppHost project file.

- <Include relativePath="reference/cli/includes/option-help.md" />

- <Include relativePath="reference/cli/includes/option-log-level.md" />

- <Include relativePath="reference/cli/includes/option-non-interactive.md" />

- <Include relativePath="reference/cli/includes/option-nologo.md" />

- <Include relativePath="reference/cli/includes/option-banner.md" />

- <Include relativePath="reference/cli/includes/option-wait.md" />

## Examples

- Delete a secret:

  ```bash title="Aspire CLI"
  aspire secret delete Parameters:postgres-password
  ```

- Delete a secret for a specific AppHost:

  ```bash title="Aspire CLI"
  aspire secret delete Parameters:rabbitmq-password --apphost ./src/MyApp.AppHost/MyApp.AppHost.csproj
  ```