Deleting a codespace

You can delete a codespace you no longer need.

Codespaces is available for organizations using GitHub Team or GitHub Enterprise Cloud. For more information, see "GitHub's products."

You can create more than one codespace per repository or even per branch. However, each user account has a limit of 10 codespaces. If you've reached the limit and want to create a new codespace, you must delete a codespace first.

Note: Only the person who created a codespace can delete it. There is currently no way for organization owners to delete codespaces created within their organization.

  1. Navigate to the "Your Codespaces" page at

  2. To the right of the codespace you want to delete, click , then click Delete

    Delete button

  1. Under "Codespaces", right-click the codespace you want to delete.

  2. In the drop-down menu, click Delete Codespace.

    Deleting a codespace in GitHub

To learn more about GitHub CLI, see "About GitHub CLI."

To delete a codespace use the gh codespace delete subcommand and then choose a codespace from the list that's displayed.

gh codespace delete

If you have unsaved changes, you'll be prompted to confirm deletion. You can use the -f flag to force deletion, avoiding this prompt.

For more information about this command, see the GitHub CLI manual.

Further reading

Did this doc help you?

Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

Or, learn how to contribute.