Today I learned ā November 10, 2021 ā 1 min read ā npm
npkill
I recently cleaned up my work laptop and came once again across this very useful package, so I thought I share it here, also as a continuous reminder to myself that it exists š
`npkill` is great for listing large `node_modules` directories and removing old ones you don't need. Free up a few gigs! https://t.co/VNuMTvHGDZ pic.twitter.com/Ptg0Oyb5Mw
ā Addy Osmani (@addyosmani) March 29, 2020
The tool itself is simple. Just run npx npkill
and it will detect all node_module
folders, giving you the option to select which ones to delete and which ones you might want to keep. Usually cleans up a fair few GB for me every bluemoon that I remember and run it šš