GH-VARIABLE-DELETE(1)

πŸ’… GH-VARIABLE-DELETE(1) β€” the GitHub CLI manual, bestie edition ✨

okay so real talk, this is the gh-variable-delete page from the GitHub CLI manual and it's literally the "yeet that variable into the sun" command. come learn it with me 🫢

🌸 NAME 🌸

gh-variable-delete β€” delete variables. that's it. that's the whole vibe. bye-bye variable πŸ‘‹

✨ SYNOPSIS ✨

gh variable delete <variable-name> [flags]

you give it a variable name, you optionally give it flags, it deletes the thing. iconic. no notes.

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so you can delete a variable at one of these levels, and the level you get depends on which flag you pass (or don't pass!):

  • repository (this is the default, no flag needed): the variable is available to GitHub Actions runs or Dependabot in a repository
  • environment: the variable is available to GitHub Actions runs for a deployment environment in a repository
  • organization: the variable is available to GitHub Actions runs or Dependabot within an organization

so like, same delete button, three different altitudes. pick your level, hun πŸ’…

πŸŽ€ OPTIONS πŸŽ€

  • -e, --env <string> β€” delete a variable for an environment. pass the env name right there in string.
  • -o, --org <string> β€” delete a variable for an organization. org name goes in string, obviously.

πŸ’– OPTIONS INHERITED FROM PARENT COMMANDS πŸ’–

  • -R, --repo <[HOST/]OWNER/REPO> β€” select another repository using the [HOST/]OWNER/REPO format. yes the brackets are real, yes HOST is optional, yes OWNER and REPO are not. slay.

🌈 ALIASES 🌈

gh variable remove

same energy, different word. use whichever one your fingers type first, fr fr.

⭐ EXIT CODES ⭐

the receipts of how it went:

  • 0: Successful execution β€” we ate, no crumbs πŸ”₯
  • 1: Error β€” something went sideways 😭
  • 2: Command canceled β€” you (or something) hit the brakes
  • 4: Authentication required β€” bestie you gotta log in first πŸ™ˆ
NOTE: specific commands may have additional exit codes. refer to the command's help for more information. iykyk πŸ’€

πŸ’œ SEE ALSO πŸ’œ

  • gh-variable(1) β€” the whole variable family, go meet the rest of them 🧚

and that's the page!! brought to you by GitHub CLI v2.102.0, dated Oct 2026 β€” mwah, go delete responsibly πŸ’…βœ¨πŸ“

πŸ“¦ where this page comes from