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/Xcode folder is unusually large
  • iPhone Simulator data is using several GB of space

How to Fix It Manually

  1. Quit Xcode first

    • Save your work in any open projects.
    • Close Xcode completely.
    • Also quit the Simulator app if it is open.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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 -rf cannot 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.

Download Kudu Free →

Fix this automatically with Kudu

Run a free system scan to detect and resolve this issue automatically — no manual steps required.

Download Kudu Free →