How to free up disk space on a Mac used for development
A developer Mac fills up in a way a normal Mac doesn’t. It isn’t your photos or your source code: it’s the caches and build data your tools create in the background. On our own dev MacBook a single clean freed 193.62 GB.
Here is where that space hides, what is safe to delete, and how to clear it by hand or with CCToolify.
Where the space goes
Xcode DerivedData
Every project you build gets intermediate build files in ~/Library/Developer/Xcode/DerivedData. Old projects keep theirs long after you stop opening them. Deleting this folder is safe: Xcode rebuilds what it needs on the next build, which will just be slower once.
Simulators and device support
Each iOS version you have installed brings simulator runtimes and devices, and every physical device you connect leaves support files in ~/Library/Developer/Xcode/iOS DeviceSupport. Simulators for iOS versions you no longer test against are often the biggest single win.
To remove simulators Xcode marks as unavailable:
xcrun simctl delete unavailable
That removes devices, not the runtimes themselves, which take the most space. List and delete old runtimes with xcrun simctl runtime list and xcrun simctl runtime delete <id>, or in Xcode › Settings › Components.
Package manager caches
Package managers keep a copy of every package version you have downloaded, so installs are faster. These caches only grow. Run the commands for the tools you actually use:
npm cache clean --force
yarn cache clean --all
pnpm store prune
pod cache clean --all
brew cleanup --prune=all
python3 -m pip cache purge
Gradle keeps its caches in ~/.gradle/caches. All of these are downloaded again when a project needs them.
Archives, build folders and logs
Xcode Archives in ~/Library/Developer/Xcode/Archives hold every build you exported. Keep the ones you may need to symbolicate crash reports for; older ones can go. Stale build and node_modules folders in projects you no longer work on, app caches and old logs add up too.
What not to delete
- Your source code, documents and photos.
- Data of apps that are running right now.
- The simulator you are using today.
- Archives of releases you still support, if you need their debug symbols.
The faster way: CCToolify
Doing this by hand works, but it means remembering a dozen paths and commands. CCToolify’s Smart Clean finds all of the above in one read-only scan, shows what each item costs, and lets you choose what goes:
- Safe items are pre-selected; simulators open in a review list that shows when you last used each one, with those not opened in 90 days pre-selected.
- Items move to the Trash, so you can undo. Anything that can’t be undone asks first.
- Data from running apps is skipped, and the simulator that is running is never touched.
- Everything happens on your Mac. Your files, file names and paths never leave it.
The Disk Scan guide walks through it step by step.