gh variable delete MY_VAR --env production

Category: GitHub CLI

gh variable delete MY_VAR --env production

Delete an environment-scoped variable

Removes MY_VAR from the production environment, so any workflow reading it must supply a fallback or fail. --env targets the environment; without it the repo-level variable is deleted. Deleting is immediate and not recoverable via gh.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.