How to Remove Xcode Cache on Mac
Free up space by cleaning Xcode caches and derived data on macOS with help from Kudu.
By Kudu Team
Fix this automatically with Kudu
Run a free system scan to detect and resolve this issue automatically — no manual steps required.
Download Kudu Free →What Causes This?
Xcode stores a lot of temporary build files, simulator data, device support files, archives, and logs so projects compile faster and debugging works properly. Over time, those cached files can grow to many gigabytes, especially if you work with multiple apps, iOS simulator versions, or frequent builds. Even after you delete old projects, Xcode often leaves behind derived data and cache files that still take up disk space.
Common Symptoms
- Your Mac is low on storage even after removing old projects
- Xcode feels slower or behaves oddly during builds
- Build errors appear after updating Xcode or switching branches
- The
~/Library/Developer/Xcodefolder is unusually large - iPhone Simulator data is using several GB of space
How to Fix It Manually
-
Quit Xcode first
- Save your work in any open projects.
- Close Xcode completely.
- Also quit the Simulator app if it is open.
-
Remove Derived Data
- In Finder, click Go in the top menu bar.
- Select Go to Folder...
- Enter this path:
~/Library/Developer/Xcode/DerivedData - Move the contents of this folder to the Trash.
- Derived Data contains temporary build products and indexes. Deleting it is usually safe, but Xcode will rebuild files the next time you open a project.
-
Delete Xcode caches
- In Finder, open Go to Folder... again.
- Go to:
~/Library/Caches/com.apple.dt.Xcode - Delete the files in that folder.
- Then check:
~/Library/Developer/Xcode/Archives - Remove old archives you no longer need. These can be large, especially if you have created many app builds.
-
Clean up iOS Simulator data
- Open Go to Folder...
- Enter:
~/Library/Developer/CoreSimulator - Look for large folders such as device data you no longer need.
- If you want a safer option, open Xcode, go to Window > Devices and Simulators, and remove old simulator devices there instead of deleting files manually.
-
Remove old device support files
- In Finder, go to:
~/Library/Developer/Xcode/iOS DeviceSupport - Delete folders for older iOS versions you no longer test against.
- These files are created when you connect physical iPhones or iPads and can take up a lot of space over time.
- In Finder, go to:
-
Empty the Trash and restart your Mac
- Right-click the Trash and choose Empty Trash.
- Restart your Mac to make sure macOS releases any locked cache files.
- After restarting, open Xcode and let it recreate only the files it still needs.
-
Optional: use Terminal for faster cleanup
- Open Terminal from Applications > Utilities.
- Run:
rm -rf ~/Library/Developer/Xcode/DerivedData/* rm -rf ~/Library/Caches/com.apple.dt.Xcode/* - Only use these commands if you are comfortable in Terminal. Deleting the wrong folder with
rm -rfcannot be easily undone.
Fix It Automatically with Kudu
If you do not want to dig through hidden Library folders, Kudu can scan for large development caches, temporary files, and other junk taking up space, then remove them safely. It is a quicker way to reclaim storage without hunting through every Xcode cache location manually.
Fix this automatically with Kudu
Run a free system scan to detect and resolve this issue automatically — no manual steps required.
Download Kudu Free →Related guides
How to Remove App Cache on Mac
Clear app cache on macOS to free space and fix sluggish apps using Kudu’s cleanup tools.
How to Remove Browser Cache on Mac
Delete browser cache on macOS to free storage and improve browsing performance with Kudu.
How to Remove Mail Cache on Mac
Clear Mail cache on macOS to recover storage and improve app responsiveness with Kudu.
How to Remove System Cache on Mac
Clean system cache files on your Mac safely and reclaim storage space with help from Kudu.