Guide / Mac developer cleanup

Mac developer cleanup: Xcode, node_modules, virtualenvs and build caches

Clean developer clutter on a Mac by reviewing Xcode DerivedData, simulators, node_modules, Python environments, package caches and logs.

Sources checked: support.apple.com. MacTidy claims on this page are grounded in the local app engine and current preview download notes.

Developer Cleanup illustration for Mac developer cleanup.
Mac Developer Cleanup: useful cleanup starts with a reviewable list.

Developer machines collect a different kind of clutter. It is not just cache. It is build output, simulator data, package stores, node_modules folders, virtual environments and logs spread across projects and global caches.

Treat build output as rebuildable

Xcode DerivedData, Swift build folders, web build output and temporary package caches are designed to be recreated. They are good cleanup candidates when disk space matters, especially after large toolchain updates.

Do not delete environments blindly

A node_modules folder or Python virtual environment may be rebuildable, but the command to rebuild it may depend on lockfiles, private registries or old versions. MacTidy’s developer cleanup labels environments separately so you can keep them when reproducibility matters.

Include global caches

Homebrew, npm, pnpm, yarn, pip, uv, Xcode and simulator caches can live outside the project folder. MacTidy’s Dev Caches scanner can include global caches or skip them, which is useful when a team policy keeps shared caches warm.

Use cleanup as a checkpoint

Before removing developer clutter, commit your work, close IDEs, and make sure the project can rebuild. Cleanup should shorten the path back to work, not turn a fragile project into an archaeology dig.

MacTidy workflow. Scan, read the list, untick what you want to keep, then remove selected items. The app is currently distributed as a developer preview DMG, so the download page calls out the signing and notarization status before installation.

Quick checklist

  1. Close IDEs and terminals using the project.

  2. Scan build output and caches separately from environments.

  3. Keep environments that cannot be reproduced quickly.

  4. Rebuild one active project after cleanup.

FAQ

What developer files are usually safe to remove?

Build output, DerivedData, old logs and package caches are usually rebuildable. Project environments need more care.

Can deleting node_modules break a project?

It can until dependencies are reinstalled, and old projects may not reinstall cleanly. Keep environments when reproducibility is uncertain.

Does MacTidy scan developer caches?

Yes. Its Dev Caches scanner groups build output, environments, logs and global caches.

Should developer cleanup run automatically?

No. Developer folders can contain work in progress. Review the list first.