Deleting heavy node_modules with npkill
cleaning up node_modules because I have low disk space.
UPDATED:
For anyone who found this post,
I found a package called npkill
https://github.com/voidcosmos/npkill
--END--
Hi all
I use a Mac and it comes with 512GB SSD. There are so many things in stalled and my SSD is low on space.
I would say docker take the most space in my laptop. But I found out that cleaning up node_modules
from older projects could help.
First, please let me give you some background.
- I run a software development team where there are more than 100 projects in both ruby and nodejs in my computer. Which I organise like this.
~/_workspace
root folder for all code._
is to make it easy to access.~/_workspace/customer_1_name/project_1_name
~/_workspace/customer_1_name/project_2_name
~/_workspace/customer_2_name/project_1_name
- I usually name folder with underscore case.
- I use
NVM
and.nvmrc
in my projects.- There are so many
node_modules
folders fromyarn
andnpm i
which is taking too much space on my laptop.
- There are so many
- I use
RVM
and.ruby-version
and.ruby-gemset
in my projects.- Rails use
yarn
and some project hasnode_modules
which is also taking too much space.
- Rails use
- There are more than 100 folders to clean up and that's for me only. My team need to do this as well.
I need help I safely delete node_modules
folders. Or if anyone face the same problem, please share your experience.
Thank you so much.