#OpenToWork Open to new opportunities: Technical Lead or DevRel let's chat and explore possibilities! Contact Elio

Finding your old GitHub Codespaces and deleting them

November 14, 2022

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.

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.

info 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.

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.

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.

Finding the old Codepace instance on the repository
Finding the old Codepace instance on the repository

Delete the Codespace, and you are done.

Codespaces cleaned
Codespaces cleaned

important Repeat these steps for your old Codespaces, which you do not use anymore.

Comments