DEV Community 👩‍💻👨‍💻

Discussion on: How to delete ALL node_modules folders on your machine and free up HD space!

zenmumbler profile image

Since it wasn't mentioned in the article: npm tools such as pnpm (by @zkochan ) and yarn in PnP mode (or the upcoming Yarn v2) will keep a single copy of (each version of) a package you use across all your projects and just link them locally, saving you a ton of space without having to worry about deleting old npm_modules folders. PNPM also does a lot of cool other stuff, not my product, but I recommend it without reservation.

markpieszak profile image
Mark Pieszak Author

Great idea! I’ll have to do add notes about pnpm in there for folks to use in the future! Thanks for reminding me 🙌🙌