DEV Community

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

Collapse
 
askjkrishna profile image
Jaya Krishna Namburu

12 GB of hard disk space :). Actually, I got an idea, if this can be written as a cronjob which runs for every 48hrs (something like that), and deletes "node_modules" for the projects which were untouched for some time. May be like more than a week. Most of the time I tend to clone a repo check something and never visit it again :X :D

Thread Thread
 
markpieszak profile image
Mark Pieszak

That’d be amazing! Great idea πŸ₯‡
We might have to look into making that real quick! Would be fairly simple with NestJS Cron jobs and it could be registered as a startup service on the OS startup maybe πŸ€”

The same happens to me, we do lots of open source & consulting so after a few weeks/months there are so many untouched projects, I’m constantly out of HD space πŸ˜‚

Thread Thread
 
askjkrishna profile image
Jaya Krishna Namburu

Exactly !! Let's start looking into this. I am new to NestJS, but it's worth a try which make life a little easier to manage :D

Thread Thread
 
markpieszak profile image
Mark Pieszak

I’ll have a (hopefully) nice introduction blogpost to NestJS coming soon so keep an eye out!

You’ll ❀️ NestJS once you get going with it !!

Thread Thread
 
askjkrishna profile image
Jaya Krishna Namburu

Thank you, so much πŸ˜„ Would love to learn and built it 😊