GH-CODESPACE-DELETE(1)
π gh-codespace-delete β bestie's guide to yeeting codespaces
okay so this is from the GitHub CLI manual (yes, that one π«Ά), and it's the page for gh-codespace-delete β the command that literally deletes codespaces. clean slate energy. β¨
π SYNOPSIS
gh codespace delete [flags]
that's it. that's the whole vibe. flags do all the heavy lifting, iykyk.
π DESCRIPTION
so basically, you delete codespaces based on selection criteria β like, you pick which ones get the axe. π
here's the tea on what you can do:
- delete all the codespaces belonging to the authenticated user
- or delete codespaces for a specific repository
- or, alternatively, delete only the codespaces that are older than N days
and one more thing π β organization administrators may delete any codespace billed to the organization. yes, any. admin main character energy, fr fr.
β¨ OPTIONS β¨
--allβ delete all the codespaces. all of them. every single one. π§Ή-c,--codespace <string>β the name of the codespace. so you can be all "just this one, thanks π "--days <N>(default0) β delete codespaces older than N days. the little default of0is just sitting there, doing its thing.-f,--forceβ skip the confirmation prompt for codespaces that contain unsaved changes. π«£ lowkey dangerous but okay bestie, go off. that confirmation exists for a reason β it's the "hey you're about to lose your work" check β so this flag is you saying "I know, I'm sure."-o,--org <login>β the login handle of the organization. admin-only, so don't come for this flag unless you're built for it. π₯-R,--repo <string>β filter codespace selection by repository name, in user/repo form. specify exactly like that:user/repo.--repo-owner <string>β filter codespace selection by repository owner (username or org). different from--repo, don't mix them up, k? π-u,--user <username>β the username to delete codespaces for. this one is used with--org, so that's the pairing. π«Ά
π EXIT CODES
like, what the exit code is telling you:
0β successful execution β¨ slay, it worked1β error π something went off2β command canceled π ββοΈ you (or someone) backed out4β authentication required π like, log in first bestie
NOTE: Specific commands may have additional exit codes. Refer to the command's help for more information. always double check, no cap.
π¦ SEE ALSO
gh-codespace(1)β the parent codespace page. go read it, it's giving essential context π
that's the whole page, bestie! π this was GitHub CLI v2.102.0, dated Oct 2026 β so like, very current, very iconic. go forth and delete responsibly. --force is not your friend unless you mean it. periodt. π
β¨πΈ
π¦ where this page comes from
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- opensuse-leap 16.0: gh 2.102.0-bp160.1.1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms