Mac Developer Cache Cleanup — Terminal Commands Cheat Sheet
Every terminal command you need to check, clean, and manage developer caches on macOS. Searchable and copy-ready.
Xcode
Check DerivedData Size
Check Sizedu -sh ~/Library/Developer/Xcode/DerivedData
Clean All DerivedData
Cleanrm -rf ~/Library/Developer/Xcode/DerivedData/*
Check Xcode Archives Size
Check Sizedu -sh ~/Library/Developer/Xcode/Archives
List iOS Simulators
Infoxcrun simctl list devices
Delete Unavailable Simulators
Cleanxcrun simctl delete unavailable
Check Device Support Size
Check Sizedu -sh ~/Library/Developer/Xcode/iOS\ DeviceSupport
Check Xcode Caches
Check Sizedu -sh ~/Library/Caches/com.apple.dt.Xcode
Android Studio / Gradle
Check Gradle Cache Size
Check Sizedu -sh ~/.gradle/caches
Clean Gradle Caches
Cleanrm -rf ~/.gradle/caches/*
Check AVD Emulator Size
Check Sizedu -sh ~/.android/avd
npm / Yarn / pnpm
Check npm Cache Size
Check Sizedu -sh ~/.npm
Clean npm Cache
Cleannpm cache clean --force
Check Yarn Cache Size
Check Sizedu -sh "$(yarn cache dir)"
Clean Yarn Cache
Cleanyarn cache clean
Check pnpm Store Size
Check Sizedu -sh "$(pnpm store path)"
CocoaPods
Check CocoaPods Cache Size
Check Sizedu -sh ~/Library/Caches/CocoaPods ~/.cocoapods
Clean CocoaPods Cache
Cleanpod cache clean --all
Flutter / Dart
Check Flutter Pub Cache Size
Check Sizedu -sh ~/.pub-cache
Repair Flutter Pub Cache
Cleanflutter pub cache repair
Homebrew
Check Homebrew Cache Size
Check Sizedu -sh "$(brew --cache)"
Clean Homebrew Cache
Cleanbrew cleanup --prune=all
Python / pip
Check pip Cache Size
Check Sizepip cache info
Purge pip Cache
Cleanpip cache purge
Rust / Cargo
Check Cargo Cache Size
Check Sizedu -sh ~/.cargo/registry ~/.cargo/git
Clean Cargo Registry Cache
Cleanrm -rf ~/.cargo/registry/cache/*
Go
Check Go Module Cache Size
Check Sizedu -sh "$(go env GOMODCACHE)"
Clean Go Module Cache
Cleango clean -modcache
Clean Go Build Cache
Cleango clean -cache
System & General
Check System Logs Size
Check Sizedu -sh ~/Library/Logs /var/log 2>/dev/null
Check Total ~/Library/Caches Size
Check Sizedu -sh ~/Library/Caches
Check Overall Disk Usage
Infodf -h /
Find 20 Largest Files in Home
Infofind ~ -type f -size +100M 2>/dev/null | head -20
Too many commands to remember?
SweepKit does all of this automatically — scan every category, review the results, and clean with one click. No terminal needed.
Download SweepKit