Guides

How to clear Xcode DerivedData safely

What Xcode DerivedData is, why clearing it is low risk, what you will rebuild afterwards, and how to remove it from Finder or with Cachelift in a few minutes.

Last updated 25 October 2026. Cachelift is published by Brixfly.

DerivedData is the folder where Xcode keeps everything it builds for your projects: compiled objects, indexes and build logs. It grows with every project and every build, and it often reaches tens of gigabytes. Xcode recreates it, so clearing it is one of the safest ways to free space on a developer Mac.

It lives here:

~/Library/Developer/Xcode/DerivedData

Check how big it is

du -sh ~/Library/Developer/Xcode/DerivedData

What you will notice after clearing it

  • The next build of each project is a full build, so it takes longer.
  • Xcode rebuilds its code index, so search and completion can be slow for a few minutes.
  • Swift packages that Xcode stored in DerivedData are fetched again, so that first build needs an internet connection.

Clear it yourself

  1. Quit Xcode, and stop any build that is running.
  2. Open the folder in Finder: open ~/Library/Developer/Xcode/DerivedData.
  3. Select the project folders inside, or all of them, and move them to the Trash.
  4. Empty the Trash when you are sure. The space is only freed then.

You can also open it from Xcode: Settings, Locations, then the arrow next to Derived Data.

What not to confuse with DerivedData

Clear it with Cachelift

Cachelift finds DerivedData, shows its size and marks it low risk. It is selected for you, and you can see the list before anything moves. Pressing the button moves it to the Trash, and you empty the Trash to get the space back.