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

# astro env variable link delete

<Info>
  This command is only available on Astro.
</Info>

Remove an explicit link, or an exclude, between a Workspace-scoped environment variable and a Deployment. Identify the variable with either `--variable-key` or `--variable-id`.

## Usage

```bash wrap theme={null}
astro env variable link delete
```

## Options

| Option            | Description                                                                          | Possible Values         |
| ----------------- | ------------------------------------------------------------------------------------ | ----------------------- |
| `--variable-key`  | The key of the Workspace variable to unlink. Provide either this or `--variable-id`. | Any string              |
| `--variable-id`   | The ID of the Workspace variable to unlink. Provide either this or `--variable-key`. | Any valid variable ID   |
| `--deployment-id` | The ID of the Deployment to unlink. Required.                                        | Any valid Deployment ID |
| `--exclude`       | Remove an exclude instead of a link.                                                 | None                    |
| `--workspace-id`  | Set the Workspace scope. Defaults to your current Workspace from CLI context.        | Any valid Workspace ID  |

## Examples

```bash wrap theme={null}
# Remove a link between a Workspace variable and a Deployment
astro env variable link delete --variable-key DATABASE_URL --workspace-id <workspace-id> --deployment-id <deployment-id>

# Remove an exclude so the auto-linked variable applies to the Deployment again
astro env variable link delete --variable-key LOG_LEVEL --workspace-id <workspace-id> --deployment-id <deployment-id> --exclude
```

## Related commands

* [`astro env variable link create`](/docs/cli/v1.43/astro-env-variable-link-create)
* [`astro env variable link list`](/docs/cli/v1.43/astro-env-variable-link-list)
