Codespace Out of Storage: How to Free Disk Space

Share
Workaround available Browser, VS Code Updated November 14, 2026How we research

Quick answer

Each codespace has limited disk. Clear apt caches, find large files, and prune Docker data from the terminal.

Most likely fix: Safe cleanup (terminal)

How to fix it

Try these in order — the most common fix is first.

  1. 1. Safe cleanup (terminal)

    1. sudo apt autoremove
    2. sudo apt clean
    3. sudo find / -printf '%s %p\n'| sort -nr | head -10 to find the 10 largest files
    4. Delete build artifacts and logs
    Did this fix it?
  2. 2. More destructive options

    1. docker system prune (add -a for all images, --volumes for volumes)
    2. git clean -i, reviewing carefully since it deletes untracked files
    Did this fix it?

Symptoms

The codespace runs out of disk space as it fills over time.

Why it happens

  • Limited storage per codespace
  • Build artifacts, logs, unused packages and Docker images accumulate

This guide also covers

  • codespace out of storage
  • codespaces no space left on device
  • codespaces disk full

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.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us
Fixed it? Share this guide

The same problem in other apps

All storage, upload & download guides →

Other GitHub Codespaces errors

All 11 GitHub Codespaces errors and fixes →