Azure / Azure/azure-dev

`azd env unset` is documented but doesn't exist — doc bug or missing feature?

Open
#9,431 0 comments 0 reactions 0 assignees View on GitHub
customer-reported question
Dominant language
Go
Stars
569
Forks
364
Avg merge
2d 19h
Merged PRs (30d)
136

Description

### Question

The environment-variables documentation tells users to remove a variable with `azd env unset VARIABLE_NAME`, but that command isn't recognized by the CLI. I'm not sure whether the **docs are wrong** or whether the **command was meant to exist and hasn't been implemented** — could you clarify the intended behavior?

**Doc page:** https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/manage-environment-variables#remove-or-update-variables

The "Remove or update variables" section says:

> To remove a variable from your environment: `azd env unset VARIABLE_NAME`

### What I observe

Running it fails with an unknown-command error:

```
azd env unset SOME_VARIABLE
```

Looking at `azd env --help`, the available subcommands are `set`, `set-secret`, `select`, `new`, `remove`, `list`, `refresh`, `get-values`, `get-value`, and the `env config` subgroup (`get`/`set`/`unset`) — there's no `unset` at the `azd env` level. The command is also absent from the [CLI reference](https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/reference). (`azd env config unset` exists but operates on `config.json`, not the environment's `.env` file, so it doesn't seem to be the same thing.)

### So which is it?

- **If it's a doc bug:** what's the supported way to remove a single variable from an environment's `.env` — is manually editing `.azure//.env` the intended approach?
- **If it's a missing feature:** is implementing `azd env unset ` on the roadmap?

### Environment

```
azd version 1.29.0 (commit fc06de978b9e9dc98a50ebb601a18b0f9f24071a) (stable)
```

Contributor guide

Open the contributing guide

Research direction

Start with the linked environment-variables documentation, the CLI reference, and `azd env --help`; compare the documented `azd env unset VARIABLE_NAME` command with the available subcommands. Confirm whether `azd env config unset` affects `.env`, then clarify whether the documentation or the CLI behavior should change and document the supported outcome.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, go
Domain
cli, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.