Ray's Knowledge Base
Unlock

The GitHub Actions cache holds 10 GB per repository, so a run-id ccache key overflows it

FactVerified 30 Sep 2026Holds anywhere
Fact. A statement and the evidence for it.

Statement#

The GitHub Actions cache limit is 10 GB per repository, the same for public and private repositories. Eviction is least-recently-used, and a cache unused for 7 days expires.

A ccache saved under a run-id key leaves the copy of the previous run. Each key prefix then holds 2 copies, and the budget overflows.

Fix: after each save, delete the older caches with the same prefix with gh cache delete. The job needs permissions: actions: write.

Evidence#

In the dftracer-utils wheel CI, the total cache size reached 10.8 GB before the cleanup step was added.

Also found by searching

  • GitHub Actions cache usage 10.8 GB exceeds 10 GB limit, caches being evicted
  • ccache in GitHub Actions keeps getting evicted and builds are cold again
  • how do I delete old ccache entries per key prefix with gh cache delete in a workflow
  • actions/cache key with github.run_id accumulates copies, what is the repository cache quota
  • Warning: Cache size of ~10.8 GB is over the 10 GB repository cache limit, GitHub Actions evicting caches
  • ccache hit rate drops, GitHub Actions caches keep getting evicted though I save one per run
  • how do I delete old actions caches with the same key prefix after saving a new ccache?
  • gh cache delete in workflow fails permission, need actions: write; run_id based cache key piles up copies