What it is
Packages installed for one JavaScript or TypeScript project.
Can you delete it?
Yes, it is rebuilt automatically. npm install (or yarn, pnpm, bun) rebuilds it from package.json and the lock file. Old projects can hold gigabytes.
How to clean it safely
- Check the project has no uncommitted work you care about (git status).
- Delete node_modules, then run npm install when you need the project again.
Related folders
- Xcode DerivedData ·
~/Library/Developer/Xcode/DerivedData - iOS DeviceSupport ·
~/Library/Developer/Xcode/iOS DeviceSupport - Xcode Archives ·
~/Library/Developer/Xcode/Archives - iOS Simulators ·
~/Library/Developer/CoreSimulator - CoreDevice (connected devices) ·
~/Library/Developer/CoreDevice
Questions
Is it safe to delete /node_modules?
Yes, it is rebuilt automatically. npm install (or yarn, pnpm, bun) rebuilds it from package.json and the lock file. Old projects can hold gigabytes.
Let the raccoon do it, safely
Junk Raccoon finds this clutter for you, shows every file first, and keeps a one-click way back. Free beta for Mac.
Download for Mac