GH-GPG-KEY-DELETE(1)

πŸ’… gh-gpg-key-delete(1) β€” like, the GitHub CLI manual, bestie edition ✨

okay so real talk: this one lives in the GitHub CLI manual, and it's your little cleanup crew for GPG keys. buckle up πŸŽ€


🌸 NAME 🌸

gh-gpg-key-delete β€” deletes a GPG key from your GitHub account. yes, that kind of delete. gone. bye. πŸ‘‹πŸ’€


✨ SYNOPSIS ✨

gh gpg-key delete <key-id> [flags]

so you hand it a <key-id>, it nukes that key off your account. flags are optional but honestly the one flag below is your bestie fr fr 🫢


πŸŽ€ OPTIONS πŸŽ€

  • -y, --yes β€” skips the confirmation prompt. no "are you sure??" moment, no emotional support question, it just goes. use it when you're confident (or when you're scripting and there's literally nobody there to type y 😭).
⚠️ heads up bestie: without -y you get a confirmation prompt. with -y you don't. that's the whole vibe check. choose wisely πŸ’…

🌈 EXIT CODES 🌈

like the receipts for how it went:

  • 0 β€” Successful execution ✨ slay, it worked
  • 1 β€” Error πŸ’€ something went sideways
  • 2 β€” Command canceled πŸ™ˆ you (or the prompt) backed out
  • 4 β€” Authentication required πŸ” GitHub needs to know it's really you first
πŸ“Œ NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information. (iykyk β€” always check the help if a number looks unfamiliar πŸ‘‘)

πŸ¦‹ SEE ALSO πŸ¦‹

  • gh-gpg-key(1) β€” the whole GPG key family, go say hi 🧚

okay that's the page!! and for the cute sign-off: this one's from GitHub CLI v2.102.0, dated Oct 2026, and yeah it's still got that same GH-GPG-KEY-DELETE(1) energy at the top and bottom of the real thing πŸ’– stay safe out there and don't delete a key you actually need, mwah πŸ“β­

πŸ“¦ where this page comes from