How to Delete a Codespace and Stop Codespaces Billing

Share
Ongoing Browser, VS Code, GitHub CLI Updated November 14, 2026Based on 3 user reportsHow we research

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. 1. Delete a codespace

    1. Web: global navigation > Codespaces > three-dot menu > Delete
    2. VS Code: Remote Explorer > right-click > Delete Codespace
    3. CLI: gh codespace delete (use --force to skip the unsaved changes prompt)
    Did this fix it?
  2. 2. Stop ongoing billing

    1. Stop codespaces when idle
    2. Delete prebuild configurations for unused repos (prebuild codespaces are not on the dashboard)
    3. Lower retention period (default 30 days)
    4. 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
Fixed it? Share this guide

The same problem in other apps

All billing, cancellation & refunds guides →

Other GitHub Codespaces errors

All 11 GitHub Codespaces errors and fixes →