APPS
STOP THE GRIFT. BUILD YOUR OWN ___.
Clean DeviceSupport, DerivedData, Archives, and CoreSimulator files safely
THIS code is open-source. Mostly because I don't want to know about your problems respectfully, but I also think you should own your own data and how you build. It is software you own. Complete each step to replace every mention of unparty. Some features may require that some steps get completed before you can party.
๐ Quick Scan: Identify Storage Hogs
# Scan all Xcode-related storage
du -sh ~/Library/Developer/Xcode/* | sort -hr
du -sh ~/Library/Developer/CoreSimulator
du -sh ~/Library/Caches/com.apple.dt.Xcode- iOS DeviceSupport: Device debugging symbols (often 50-100GB+)
- DerivedData: Build artifacts and indexes (10-50GB)
- Archives: App store submissions and exports (5-20GB)
- CoreSimulator: iOS Simulator data (10-30GB)
- Caches: Build caches and temporary files (5-15GB)
โ ๏ธ Safety First: Pre-Cleanup Checklist
- Close Xcode completely before running cleanup commands
- Commit and push any uncommitted work
- Note active projects โ DerivedData cleanup will trigger full rebuilds
- Backup critical Archives if they contain unique builds
๐งน Step-by-Step Cleanup Commands
# Clean iOS DeviceSupport (largest impact, 50-100GB+)
rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/*
rm -rf ~/Library/Developer/Xcode/watchOS\ DeviceSupport/*
rm -rf ~/Library/Developer/Xcode/tvOS\ DeviceSupport/*# Clean DerivedData (triggers rebuilds)
rm -rf ~/Library/Developer/Xcode/DerivedData/*# Clean old Archives (review first)
open ~/Library/Developer/Xcode/Archives
# Manually delete old archives, or:
# rm -rf ~/Library/Developer/Xcode/Archives/*# Clean CoreSimulator data
xcrun simctl delete unavailable
xcrun simctl erase all
# Or nuclear option:
# rm -rf ~/Library/Developer/CoreSimulator# Clean Xcode caches
rm -rf ~/Library/Caches/com.apple.dt.Xcode
rm -rf ~/Library/Caches/org.swift.swiftpm๐ง System-Level Cleanup (Advanced)
# Check Time Machine local snapshots
tmutil listlocalsnapshots /
# Delete specific snapshot (if found):
# sudo tmutil deletelocalsnapshots YYYY-MM-DD-HHMMSS
# Clear system caches (requires restart)
sudo dscacheutil -flushcache๐ฑ What to Expect After Cleanup
- Device connections: "Copying cache symbols" when connecting iOS devices (2-5 min)
- Project builds: Longer initial build times as indexes rebuild
- Simulators: Need to re-download and install simulator runtimes
- Swift packages: Package dependencies will re-download on next build
- Immediate benefit: 50-150GB of reclaimed storage space
# Verify space reclaimed
df -h
du -sh ~/Library/Developer/Xcode/* | sort -hr๐ค Automation Tip
#!/bin/bash
# xcode-cleanup.sh - Run monthly
echo "Cleaning Xcode storage..."
rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/*
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Caches/com.apple.dt.Xcode
xcrun simctl delete unavailable
echo "Cleanup complete!"โUsing Xcode? Definitely routinely check storage.โ
โ unparty-app












