Reference / Developer artifacts
Is it safe to delete node_modules folders on a Mac?
Safe to delete
It re-downloads on demand the next time it's needed.
**/node_modules
What it is
Reinstall with `npm install` or `pnpm install`
If you delete it
Project won't run until reinstalled. Downloads from npm (needs internet)
How to get it back
npm install (or pnpm install / yarn)Recovery time
about 2 minutes
Category
Developer artifacts
Don't guess — let diskspace check it live.
It pressure-tests the path against your live disk state and stages it reversibly, so you never lose anything you needed.
$ brew install tymrtn/diskspace/diskspace
$ diskspace explain **/node_modules # verdict + live pressure-test