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)
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:
What I observe
Running it fails with an unknown-command error:
Looking at
azd env --help, the available subcommands areset,set-secret,select,new,remove,list,refresh,get-values,get-value, and theenv configsubgroup (get/set/unset) — there's nounsetat theazd envlevel. The command is also absent from the CLI reference. (azd env config unsetexists but operates onconfig.json, not the environment's.envfile, so it doesn't seem to be the same thing.)So which is it?
.env— is manually editing.azure/<env-name>/.envthe intended approach?azd env unset <key>on the roadmap?Environment