OPEN TO WORK

Available for new opportunities! Let's build something amazing together.

Finding your old GitHub Codespaces and deleting them

GitHub Codespaces
post

This post is over a year old, some of this information may be out of date.

Over the weekend, I received a couple of emails I was running out of GitHub Codespaces storage. My limit is 20GB, but more interesting is that I rarely use codespaces.

Show image GitHub Codespaces storage usage
GitHub Codespaces storage usage

The last time I used Codespaces was about a year ago, but I couldn’t remember which repository it was. I tried to check a couple of repositories but without success.

When reaching out to GitHub and following the documentation, I found out how to best find all of your old Codespace instances.

{{< blockquote type="info" text="Viewing your GitHub Codespaces usage

Finding your old Codespaces

To find your old Codespaces, you must first go to your Billing and plans page, which you find under your settings.

Show image Storage usage on billing
Storage usage on billing

You will see a Codespaces status, but this does not return the instances. For that, you have to generate a usage report.

You can create a usage report by clicking on the Get usage report button and selecting the date range of your preference. I went for the last seven days.

In the report, you will see the old Codespace instances.

Show image Billing report with Codespace instances
Billing report with Codespace instances

Deleting your old Codespaces

Now the only thing to do is delete these instances. With the report, you get the repository slug. Use the slug to your GitHub repo, where you can find the Codespace.

Show image Finding the old Codepace instance on the repository
Finding the old Codepace instance on the repository

Delete the Codespace, and you are done.

Show image Codespaces cleaned
Codespaces cleaned

Related articles

Report issues or make changes on GitHub

Found a typo or issue in this article? Visit the GitHub repository to make changes or submit a bug report.

Comments

Elio Struyf

Solutions Architect & Developer Expert

Loading...

Let's build together

Manage content in VS Code

Present from VS Code