How to Delete a Codespace and Stop Codespaces Billing
Quick answer
Stop idle codespaces to end compute charges, and delete them to stop storage charges from accruing. Deleting does not reduce the current month's storage total.
Most likely fix: Delete a codespace
How to fix it
Try these in order — the most common fix is first.
1. Delete a codespace
- Web: global navigation > Codespaces > three-dot menu > Delete
- VS Code: Remote Explorer > right-click > Delete Codespace
- CLI: gh codespace delete (use --force to skip the unsaved changes prompt)
Did this fix it?2. Stop ongoing billing
- Stop codespaces when idle
- Delete prebuild configurations for unused repos (prebuild codespaces are not on the dashboard)
- Lower retention period (default 30 days)
- Set budgets for Codespaces at github.com/settings/billing
Did this fix it?
Symptoms
Unexpected Codespaces charges or storage usage.
Why it happens
- Storage is billed while a codespace exists, even stopped
- Prebuilds consume storage without any codespace
- Idle codespaces count compute until stopped
This guide also covers
- how to delete codespace
- stop codespaces billing
- cancel github codespaces
- delete all codespaces
Still not working?
If GitHub Codespaces keeps failing, you're not alone. See every GitHub Codespaces problem users report or the alternatives people switch to.
We build software. Any software.
Paying for apps that don't quite fit? We build exactly what you need.
We're a small team of developers who build custom software fast. Not just tools like GitHub Codespaces: web and mobile apps, games, desktop software, AI tools, internal tools: whatever you have in mind. We build and run our own products too: booking platforms, games, learning apps. See our work
- Web apps & SaaS
- Mobile apps (iOS & Android)
- Games
- Desktop software
- AI tools & automations
- Internal tools & dashboards
- Client portals & booking
- Your own version of any tool
- ✓ Free 15-min call to scope it
- ✓ Price agreed up front
- ✓ Your data, your code
The same problem in other apps
Other GitHub Codespaces errors
- Codespace Running in Recovery Mode: "This codespace is currently running in recovery mode due to a container error"
- GitHub Codespaces Creation Failed
- Can't Create a Codespace: No Option to Create on the Repository
- GitHub Codespaces "503 Service Unavailable" Error
- Codespaces "Oh no, it looks like you are offline" and Other Connection Errors
- GitHub Codespaces Port Forwarding Not Working
- Codespace Out of Storage: How to Free Disk Space
- Codespaces Included Usage Used Up: Core Hours and Storage Quota