Skip to content
ElegantMacelegantmac.
How-to3. November 2026·8 min read

How to clean Xcode and developer files on a Mac

Xcode, simulators, package caches and node_modules can quietly take 50 GB or more. Here is what is safe to remove and what to keep.

E

ElegantMac

Editorial

ElegantMacElegantMac Journal
How-to
On this page

If you build apps on a Mac, your disk fills in a way that ordinary cleaning advice never touches. Build files, simulators, package caches and dependency folders add up fast, and Storage settings shows them as one lump called Developer. Most of it can be made again. Here is what you can remove, and what to think about first.

DerivedData: the safest big win

Xcode keeps build products and indexes in ~/Library/Developer/Xcode/DerivedData. It can grow to many gigabytes. It is safe to delete, because Xcode rebuilds what it needs the next time you build, though that first build will be slower. Quit Xcode first.

Simulators and platforms

Each iOS, watchOS or visionOS simulator runtime can take several gigabytes. In Xcode, open Settings and choose Platforms (called Components in older versions) to remove runtimes you no longer test on. You can also run xcrun simctl delete unavailable in Terminal to remove simulators that no longer work. Do not delete simulator folders by hand.

Device support files and archives

  • ~/Library/Developer/Xcode/iOS DeviceSupport holds symbols for devices you have connected. Xcode downloads them again when needed, so old ones can go.
  • ~/Library/Developer/Xcode/Archives holds your archived builds. Keep the archives for apps you have released, because you may need their symbols for crash reports. Older test archives can go.

Package caches

Swift Package Manager and CocoaPods keep caches that are re-downloaded when needed. Homebrew keeps old downloads too, and brew cleanup clears them. Clearing a cache costs you a slower next build, not data.

node_modules and build folders

Every JavaScript project carries its own node_modules, and old projects are the worst offenders. If a project is finished, delete its node_modules folder. Running npm install brings it back when you need it. Build output folders such as dist and build are made again the same way.

Docker needs its own steps

Docker keeps images and volumes inside its own disk image, so deleting files in Finder does nothing. Use Docker Desktop's settings, or docker system prune, and read what it will remove first. Pruning deletes stopped containers and unused images, and volumes can hold real data.

A safer way to see it all first

Before you delete anything, it helps to see the sizes. Dev Cleanup, in our app Speed Up My Mac, measures files your tools can make again, such as build files and caches, and lets you pick what to move. It only looks in folders you allow. For things only another tool can remove properly, it tells you where. Docker's space is shown but controlled in Docker, and simulators are removed in Xcode Settings.

A habit that helps

Clear DerivedData and old simulators every month or two, and delete node_modules when you finish a project. For the rest of the disk, see how to free up space on a Mac.

E

Written by

ElegantMac

Editorial

Keep reading

Latest stories

View all

ElegantMac Journal

One thoughtful email, once a month.

The best of the blog, new app notes, and nothing else.