Free Up Disk Space Cleaning Xcode Junk | Generated by AI

Home 2025.10

Good question 👍 Xcode (and iOS Simulator) can accumulate a lot of junk over time—build cache, derived data, simulator devices, device support files, logs, etc. Cleaning them up frees gigabytes. Here’s a structured approach:


1. Clear Derived Data (Build Cache)

This removes old build products, intermediates, and indexes.


2. Clean Simulator Data


3. Remove Old Device Support Files

When you connect real devices, Xcode downloads debugging symbols for each iOS version. They pile up.

rm -rf ~/Library/Developer/Xcode/iOS\ DeviceSupport/*

4. Clean Archives

App archives from “Product → Archive” consume a lot.


5. Clean Logs

rm -rf ~/Library/Developer/Xcode/DocumentationCache/*
rm -rf ~/Library/Developer/Xcode/ios device logs/*
rm -rf ~/Library/Logs/CoreSimulator/*

6. Clean Derived Indexes & Module Cache

rm -rf ~/Library/Developer/Xcode/DerivedDataModuleCache/*

7. Optional: Full Reset

If you want to reset Xcode-related caches completely:

rm -rf ~/Library/Developer/Xcode/*
rm -rf ~/Library/Developer/CoreSimulator/*

(This removes everything: simulators, archives, derived data, etc. Next Xcode launch will feel “fresh install.”)


⚠️ Tips


Do you want me to give you a single script you can run to clean all the common junk in one go (with optional flags)?


Back

openai/gpt-5

Donate