# remove-environment-variables

> Remove environment variables with the Unkey API CLI

Remove named variables from an environment without changing other variables.

## Usage

```bash
unkey api environments remove-environment-variables [flags]
```

## Flags

<ParamField body="--project" type="string" required>
Project identifier or slug.
</ParamField>
<ParamField body="--app" type="string" required>
Application identifier or slug.
</ParamField>
<ParamField body="--environment" type="string" required>
Environment identifier or slug.
</ParamField>
<ParamField body="--variables" type="string[]" required>
Comma-separated variable names to remove.
</ParamField>

## Global Flags

| Flag | Type | Description |
|------|------|-------------|
| `--root-key` | string | Override root key (`$UNKEY_ROOT_KEY`) |
| `--api-url` | string | Override API base URL (default: `https://api.unkey.com`) |
| `--config` | string | Path to config file (default: `~/.unkey/config.toml`) |
| `--output` | string | Output format - use `json` for raw JSON |
| `--body` | string | Send this JSON string as the request body. You cannot combine it with request-building flags. |

## Examples

<CodeGroup>
```bash Basic
unkey api environments remove-environment-variables --project=payments --app=payments-api --environment=production --variables=OLD_TOKEN,LEGACY_URL
```
</CodeGroup>

See the [Remove environment variables API reference](https://www.unkey.com/docs/api-reference/v2/environments/remove-environment-variables).
