Clear node_modules, Xcode and build caches in one go.
Developer Macs fill up with files that tools rebuild on demand: node_modules in every old project, build folders, Xcode DerivedData, simulator caches, Android SDK images and package manager caches. DiskMate finds all of them across your scan, adds them up and lists them under Safe to clear.
Pay once, keep it forever. No subscription, no account.
358 GB used. This scan measured 295.0 GB of it in 1,284,902 files.
in 9 places. Apps rebuild these when they need them.
in 14 places. Real files you may still want.
Example scan. Names and sizes are illustrative.
What it finds
Every node_modules folder in every project you scanned, each with its size. npm install brings them back.
.next, .nuxt, .turbo, .parcel-cache, .svelte-kit, .angular, __pycache__, .pytest_cache, .mypy_cache and DerivedData, wherever they are.
target, build, dist, out and .build, but only when they sit next to a project file such as package.json, Cargo.toml, pom.xml, build.gradle, pyproject.toml, Package.swift, go.mod, CMakeLists.txt or a Makefile. A folder you happened to name build is left alone.
DerivedData, iOS, watchOS and macOS DeviceSupport, and CoreSimulator caches in ~/Library/Developer.
SDK system images, emulator images in ~/.android/avd and ~/.android/cache.
~/.npm/_cacache, ~/.pnpm-store, ~/.yarn/berry/cache, ~/.cargo/registry, ~/.m2/repository, ~/.gradle/caches, ~/.cache/pip and ~/.bun/install/cache.
How it works
- 1Scan your code folder
Point DiskMate at
~/Developer,~/Projectsor your whole home folder. Fixed locations like Xcode and package caches are checked on their own. - 2See the totals
Cleanup shows each category with its size and item count. Open any one to see every folder it found, project by project.
- 3Clear what you're done with
Tick the categories or individual folders and press Clean. They move to the Trash, and your tools rebuild them next time.
Open the Trash, select what you want and choose Put Back. It returns to the exact folder it came from. Only emptying the Trash deletes for good, and DiskMate labels that button clearly.
Nothing disappears by surprise
- Your source code,
.gitfolders and project files are never listed. - Build folders with common names only count when a project file sits next to them.
- Cache folders like DerivedData are emptied, not removed, so tools find them where they expect.
- Everything goes to the Trash first. Restore a folder if a build needs it before you can re-run it.
Prefer to do it by hand?
Each tool has its own clean-up command: npm cache clean --force, pnpm store prune, yarn cache clean, xcrun simctl delete unavailable, docker system prune. For node_modules, you have to find them first.
This lists every node_modules folder under a folder with its size, without deleting anything:
$ find ~/Developer -name node_modules -type d -prune -exec du -sh {} + | sort -hQuestions
Is it safe to delete node_modules?+
Yes. node_modules only holds downloaded dependencies. Running npm install (or pnpm or yarn) in the project downloads them again from your lockfile. Delete them in projects you're not working on right now.
Is it safe to delete Xcode DerivedData?+
Yes. DerivedData holds build output and indexes. Xcode rebuilds it on your next build, which will take a little longer the first time.
What about ~/.m2, Gradle and Cargo caches?+
These are download caches for Maven, Gradle and Cargo. Clearing them is safe; the next build downloads what it needs again, so it will be slower once and needs a network connection.
Does DiskMate find node_modules in every project?+
Yes, in every project inside the folder you scan. Scan your home folder to catch projects anywhere, and each node_modules folder is listed with its size.
Will it touch my source code or git history?+
No. DiskMate only lists dependency folders, build output and caches. Source files, project files and .git folders are never listed for cleanup.
More in DiskMate
A cleanup list sorted into Safe to clear and Worth a look. You tick what goes.
Learn moreEvery folder and file ranked by size, in six views you can click into.
Learn moreEach app's real size, leftovers included, removed together in one step.
Learn more