ScrubsDownload

Guides › Mac folder guide · updated

What is DerivedData on a Mac, and can you delete it?

~/Library/Developer/Xcode/DerivedData

By Parsa Nasirimehr

Yes. DerivedData is Xcode's build output and code index, one folder per project you ever opened. Deleting it is safe: Xcode rebuilds what it needs on the next build, which then takes longer.

How big it gets

On the Mac we measured, a working developer's Mac on macOS 27: 10.1 GB in 14 project folders; the largest was 5.8 GB.

What it is

What writes itXcode, every time it builds or indexes a project. Each project gets a folder named after it plus a random suffix, such as Storefront-bxqkqhfg….
What's insideBuild (compiled products and intermediate files), Index.noindex (the code index behind autocomplete and jump-to-definition), Logs, and a shared ModuleCache.noindex.
Why it growsXcode never removes the folders of projects you stopped opening, and every branch switch or Xcode update can add more.
Comes back?Yes, on the next build of that project. The first build and the first indexing after deleting it take noticeably longer.

How to clear it

  1. Quit Xcode, or at least stop any build.
  2. Delete the whole folder, or only the subfolders of projects you no longer work on. In Terminal: rm -rf ~/Library/Developer/Xcode/DerivedData
  3. For one open project, Product › Clean Build Folder (⇧⌘K) removes only its build products and keeps the index.

What you lose: Nothing you made. You lose build time and the code index until they rebuild.

With Scrubs: Scrubs's Quick Wins lists DerivedData with its size and moves it to the Trash, so you can put it back with ⌘Z. Download Scrubs; scanning is free.

Related folders

Sizes measured with du on 1 November 2026. Paths and commands apply to macOS 15 and later. See also how to free up disk space on a Mac.

About the author: Parsa Nasirimehr is a mobile app developer who builds Scrubs, a disk map for the Mac. Spotted something wrong? Write to support@getscrubs.app.