Deleting a codespace

You can delete a codespace you no longer need.

代码空间可用于使用 GitHub Team 或 GitHub Enterprise Cloud 的组织。 更多信息请参阅“GitHub 的产品”。

每个仓库甚至每个分支可创建多个代码空间。 However, each user account has a limit of 10 codespaces. 如果您已达到上限,想要创建一个新的代码空间,必须先删除一个旧代码空间。

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. 在“Codespaces(代码空间)”下,右键点击您要删除的代码空间。

  2. 在下拉菜单中,单击 Delete Codespace(删除代码空间)

    在 GitHub 中删除代码空间

要了解有关 GitHub CLI 的更多信息,请参阅“关于 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




所有 GitHub 文档都是开源的。看到错误或不清楚的内容了吗?提交拉取请求。


或者, 了解如何参与。