DevCleaner
Menu
Skip to content
Browse guides

Xcode CompilationCache.noindex: Why Finder Shows More Than You Can Free

Compare apparent and allocated Xcode cache sizes, reproduce a sparse-file example and clean the specific cache you intend to rebuild.

On this page

Three sizes that answer different questions

CompilationCache.noindex can contain sparse compiler-cache files. Their logical length can be much larger than the physical blocks allocated on your Mac. Deleting the logical size is not a promise of gaining that much free space.

MeasurementMeaningUse
Apparent / logical sizeFile length, including sparse gapsExplains large Finder or size-listing values
Allocated sizeDisk blocks currently assigned to filesBetter estimate for sparse-file cleanup
Available disk spaceWhat the filesystem can currently useCheck before and after cleanup

Compare the cache measurements on macOS

cache_path="$HOME/Library/Developer/Xcode/DerivedData/CompilationCache.noindex"
du -sh "$cache_path"
du -A -sh "$cache_path"
df -h "$HOME"

The first du reports allocated usage; macOS du -A reports apparent usage. These are macOS commands, not interchangeable flags on every operating system. If the path is absent, inspect your active Xcode DerivedData location in Settings → Locations. APFS clones, snapshots and still-open deleted files can also make the final change in free space differ from the sum of file sizes.

Try a reproducible sparse-file example

This example creates one temporary file, not an Xcode benchmark. Python creates a 1 GiB logical file without writing a gigabyte of data. The temporary directory removes it afterwards. Compare the printed logical and allocated values on your filesystem.

python3 - <<'PYEX'
import os
import tempfile
with tempfile.TemporaryDirectory() as demo_dir:
    path = os.path.join(demo_dir, "sparse-demo")
    with open(path, "wb") as demo_file:
        demo_file.truncate(1024 ** 3)
    info = os.stat(path)
    print("Logical bytes:", info.st_size)
    print("Allocated bytes:", info.st_blocks * 512)
PYEX

In a temporary-file check on the author’s Mac on October 4, 2026, this printed Logical bytes: 1073741824 and Allocated bytes: 0. That demonstrates sparse allocation only; it is not a measurement of your Xcode cache or expected savings.

Clean only the cache you intend to rebuild

Quit Xcode and finish builds first. In Finder → Go → Go to Folder, inspect the CompilationCache.noindex folder and move that specific cache to Trash if you accept a slower subsequent build. Keep project source and needed archives/dSYMs. Clearing Compilation Cache differs from deleting every per-project DerivedData folder.

DevCleaner measures allocated space and separates Compilation Cache, Module Cache, Symbol Cache, SDK Stat Caches and project folders. Its selection estimate also avoids counting overlapping paths twice. See the broader Xcode cleanup guide and cleanup evidence.

FAQ

Is a 30 GB Compilation Cache guaranteed to free 30 GB?
No. A logical-size figure can include sparse gaps. Check allocated usage and available filesystem space before and after cleanup.
Can I delete CompilationCache.noindex?
It is rebuildable compiler cache. Finish builds and quit Xcode before clearing it; expect subsequent compilation to regenerate needed entries.

References and scope

Reviewed against DevCleaner 1.14.5 and the references below on October 4, 2026. Locations can change with tool versions and custom settings. The examples are inspection steps and deliberate cleanup actions, not a measured claim about how much space your Mac will recover.

Review the space before cleaning

DevCleaner separates built-in Safe caches from Warning and Danger items. Safe Quick Clean is free; deep cleanup requires Pro on new Free installations. See Free and Pro features.

Download DevCleaner ↓
macOS 14+ · Developer ID signed · notarized by Apple