> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alpic.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# environment delete

> Delete an environment

Delete an environment from a project. Production environments cannot be deleted. This operation is not reversible: associated logs, analytics, and metrics are deleted as well.

## Usage

```bash theme={null}
alpic environment delete --environment-id <environmentId>
```

Prompts for confirmation, then deletes the specified environment.

## Extended Usage

Delete an environment by name:

```bash theme={null}
alpic environment delete --environment-name <environmentName> --project-name <projectName>
```

Delete in automation without a confirmation prompt:

```bash theme={null}
alpic environment delete --environment-id <environmentId> --non-interactive
```

When no identifier is provided, you will be prompted to select a project and then an environment interactively:

```bash theme={null}
alpic environment delete
```

<Warning>
  Deleting an environment cannot be undone. Associated logs, analytics, and metrics are removed. The production
  environment of a project cannot be deleted.
</Warning>

## Options

| Flag                 | Description                                                                                           | Default |
| -------------------- | ----------------------------------------------------------------------------------------------------- | ------- |
| `--environment-id`   | The ID of the environment.                                                                            | —       |
| `--environment-name` | The name of the environment.                                                                          | —       |
| `--project-id`       | The ID of the project.                                                                                | —       |
| `--project-name`     | The name of the project.                                                                              | —       |
| `--non-interactive`  | Disable interactive prompts. Requires `--environment-id` or `--environment-name`. Skips confirmation. | `false` |
