How to fully uninstall Xcode on Mac
Xcode is one of the largest consumers of Mac disk space. The app alone is 10–15 GB, but simulators, derived data, and caches can push the total past 50 GB. Here's how to get it all back.
10–15 GB
App bundle size
10–30 GB
Simulators + DerivedData
Up to 50 GB
Total reclaimed
What Xcode leaves behind
Xcode scatters data across your entire system. The app bundle is just the beginning:
| Location | Contents | Size |
|---|---|---|
| /Applications/Xcode.app | Main app bundle — 10–15 GB by itself | 10–15 GB |
| ~/Library/Developer/Xcode/ | Derived data, archives, device support files | 5–30 GB |
| ~/Library/Developer/CoreSimulator/ | iOS, watchOS, tvOS simulators | 5–20 GB |
| ~/Library/Caches/com.apple.dt.Xcode/ | Xcode build and module caches | 1–5 GB |
| ~/Library/Application Support/Xcode/ | Plug-ins, themes, snippets, custom data | 100 MB–2 GB |
| ~/Library/Preferences/com.apple.dt.Xcode.plist | User preferences | Tiny |
| ~/Library/Saved Application State/com.apple.dt.Xcode.savedState/ | Window state | Tiny |
| ~/Library/Logs/CoreSimulator/ | Simulator logs | 100 MB+ |
| /Library/Developer/ | System-level developer tools and frameworks | Varies |
Clean simulators without uninstalling Xcode
If you want to keep using Xcode but reclaim space from old simulators and derived data:
Delete old simulators via Xcode
Xcode → Window → Devices and Simulators → Simulators → select old simulators → delete. Or use the terminal: xcrun simctl delete unavailable
Delete DerivedData
DerivedData contains build artifacts for every project you've built. It's safe to delete — Xcode regenerates it when you build again.
rm -rf ~/Library/Developer/Xcode/DerivedDataClear Xcode caches via Xcode
Xcode → Settings → Locations → Derived Data → click the arrow → delete. Or manually delete ~/Library/Caches/com.apple.dt.Xcode.
Full removal (step-by-step)
To completely remove Xcode and all associated data:
- 1. Quit XcodePress ⌘Q to close Xcode completely.
- 2. Delete Xcode.appDrag Xcode.app from
/Applicationsto Trash. (~10–15 GB) - 3. Remove simulators (biggest cleanup)
rm -rf ~/Library/Developer/CoreSimulator/This removes all iOS, watchOS, and tvOS simulators. (~5–20 GB) - 4. Remove DerivedData
rm -rf ~/Library/Developer/Xcode/DerivedData/ - 5. Remove Archives (optional — keep if you care about old builds)
rm -rf ~/Library/Developer/Xcode/Archives/ - 6. Clear caches
rm -rf ~/Library/Caches/com.apple.dt.Xcode/ - 7. Remove Application SupportPress ⌘ Shift G →
~/Library/Application Support→ delete the Xcode folder. - 8. Remove developer tools (optional)
sudo rm -rf /Library/Developer/⚠ Only do this if you're completely removing all Apple developer tools. Requires sudo.
Automated removal with Zapper
Zapper handles steps 2–7 automatically, finding all files in ~/Library including the Developer folder:
- Drop
Xcode.apponto Zapper's window. - Zapper scans and shows all leftover files with sizes — you'll see the DerivedData, simulator, and cache folders listed.
- Deselect Archives if you want to keep old build archives.
- Click Zap — everything moves to Trash, giving you a chance to review before emptying.
Note: Zapper covers all ~/Library paths. The /Library/Developer/ system path (not ~/Library) requires sudo in Terminal as above.