Apps

ccache

Compiler output is stored by ccache under a hash-based disk cache so repeated C and C++ compilations can reuse previously built object files instead of invoking the compiler again. That cache accumulates compiled object files, manifest entries, dependency metadata, temporary files, and statistics records as source trees, compiler flags, and toolchain versions change over time. Kudu removes those reusable build artifacts and cache metadata from ccache’s cache directory without touching your source code, projects, build scripts, or compiler settings.

Why clean ccache?

  • A long-lived cache can grow to several gigabytes with old object files from branches, build directories, and compiler versions you no longer use, leaving you with unexplained disk loss on macOS or Linux.
  • Entries created before a compiler upgrade or changed warning flags stop matching current hashes, so ccache spends time probing stale records and you notice lower cache hit rates and slower incremental builds.
  • Corrupted manifest or result files can turn expected cache hits into repeated recompiles, showing up as build times suddenly regressing even though only a few files changed.
  • Old cached objects from abandoned targets and architectures consume space until ccache starts evicting useful recent entries, which users notice as inconsistent build speed from one run to the next.
  • If temporary files are left behind after interrupted builds, the cache directory can bloat and filesystem scans during builds may feel slower than expected.
  • Shared or heavily reused caches can accumulate many obsolete entries, and the practical symptom is that ccache reports poor effectiveness while still occupying a large amount of storage.
  • Large ccache directories often become fragmented on disk, so metadata lookups and cleanup passes take longer and developers notice extra overhead before the next compile even starts.
What gets cleaned

Cache paths Kudu targets

macOS

~/Library/Caches/ccache

Linux

~/.cache/ccache
Frequently asked

Common questions about ccache

Free & open source

Download Kudu and reclaim your disk space.

Available on Windows, macOS, and Linux. No account required, no feature gates, no telemetry without consent. All cleaning targets are open source and community-auditable.