Skip to content

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

Description

@JoelQuimper

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. (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-name>/.env the intended approach?
  • If it's a missing feature: is implementing azd env unset <key> on the roadmap?

Environment

azd version 1.29.0 (commit fc06de978b9e9dc98a50ebb601a18b0f9f24071a) (stable)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions