XcodesApp icon indicating copy to clipboard operation
XcodesApp copied to clipboard

Add Storage Management Tools for Xcode Junk

Open binshakerr opened this issue 11 months ago • 1 comments

Tell us how we can improve Xcodes Xcode installations accumulate a large amount of residual files over time—Derived Data, old iOS/watchOS/tvOS simulators, device support files, caches, and other build artifacts. These can easily grow to tens of gigabytes and are difficult to manage manually. Adding built-in storage management tools would make Xcodes a far more complete and helpful utility for developers.

Is your feature request related to a problem? Please describe. Yes. Xcode’s leftover files take a huge portion of disk space, especially for developers who frequently install multiple Xcode versions or test across many simulators. Cleaning these folders manually or via scripts is inconvenient, error-prone, and not beginner-friendly. There is currently no unified place in Xcodes to view and manage storage usage across all installed components.

What would you like to see? How would you like it to work? I would love Xcodes to include a Storage Management section that: • Automatically detects large Xcode-related directories (Derived Data, Archives, Logs, Device Support, etc.) • Lists installed simulators with their sizes and allows quick removal of unused ones • Shows total storage usage per Xcode installation • Offers one-click cleanup actions (e.g., “Clear Derived Data”, “Remove old Simulators”, “Clean Caches”) • Optionally provides recommendations for safe cleanup based on last-used timestamps

This would make Xcodes not only a great installer manager but also the central tool for maintaining a clean and optimized Xcode environment.

binshakerr avatar Dec 10 '25 08:12 binshakerr

+1 for built-in storage management. Xcode-related caches can easily consume 50-100 GB:

Path Typical Size
~/Library/Developer/Xcode/DerivedData 10-50 GB
~/Library/Developer/Xcode/Archives 5-20 GB
~/Library/Developer/CoreSimulator 10-40 GB
~/Library/Caches/com.apple.dt.Xcode 2-10 GB
~/Library/Developer/Xcode/iOS DeviceSupport 5-15 GB
~/Library/Developer/Xcode/watchOS DeviceSupport 2-5 GB

Quick cleanup commands for now:

# DerivedData (safe to delete, rebuilds automatically)
rm -rf ~/Library/Developer/Xcode/DerivedData/*

# Old simulators
xcrun simctl delete unavailable

# Xcode caches
rm -rf ~/Library/Caches/com.apple.dt.Xcode

# Old device support files (keep only your current iOS version)
ls -la ~/Library/Developer/Xcode/iOS\ DeviceSupport/

For ongoing monitoring of all these paths (plus CocoaPods, SPM, Carthage, and 40+ other developer caches), I maintain ClearDisk a free macOS menu bar utility that watches all Xcode cache locations and shows exactly what's eating your disk space.

bysiber avatar Mar 05 '26 01:03 bysiber