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

Finding your old GitHub Codespaces and deleting them

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.

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.

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
important

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

Comments

Back to top