Short answer
Most developer data can be rebuilt or downloaded again, so clearing it is safe. The cost is time: a clean build takes longer, and cleared packages download again. Close Xcode and your editors first, and look before you run a command that deletes.
Xcode
- DerivedData holds build products and indexes:
~/Library/Developer/Xcode/DerivedData. Xcode recreates it on the next build. - Archives hold app builds you made to ship:
~/Library/Developer/Xcode/Archives. Keep the ones you may need to submit or symbolicate. - Device support files for connected devices:
~/Library/Developer/Xcode/iOS DeviceSupport. Xcode downloads them again when you connect the device. - Simulators can be pruned of runtimes you no longer have:
xcrun simctl delete unavailable
Package caches
- Homebrew:
brew cleanupremoves old versions and cached downloads. - npm:
npm cache clean --forceempties the npm cache. - Cargo: downloaded crates are under
~/.cargo/registry; Cargo fetches them again when needed. - pip:
pip cache purgeremoves cached wheels.
Project folders
Each project can carry its own large folders: node_modules, target and build. They are rebuildable from your source and lock files. Deleting them is safe, and the price is the time to install or build again. Delete them in projects you are not working on.
Docker
See what Docker is using before you delete anything:
docker system df
docker system prune removes stopped containers, unused networks, dangling images and unused build cache. Adding -a removes all unused images, and --volumes removes unused volumes, which can hold database data. Read the prompt it shows you.
Local AI models
Tools that run models on your Mac store the downloaded files in their own folders and these are often several files you can find with a size search. Check the tool’s own documentation for how to remove a model it no longer needs. A model downloads again if you remove it, so be sure you want to re-download it first.
For other places to look, see Mac storage full: what to check first.
What JunkTrace does differently
JunkTrace's Developer tool lists dependencies and build folders from your projects, plus tool caches such as Homebrew, npm and Cargo. Your source code is never touched. Simulators, Docker images and AI models are listed but never selected for you.