Find Unused npm Packages in Your Package.json
The problem is, after a few days, weeks, or months of hacking, how the heck do we know what isn't even being used anymore?
Find unused packages
It's easy with a neat package called
From your terminal, go into the root folder of your project (wherever your package.json lives) and run the following command:
Now you'll see the output showing two sections, your "unused depencies", and "unused devDependencies".
Now, uninstall those suckers!!!
Although it's usually great, I've noticed occasionally depcheck gets it wrong, so make sure you confirm that you aren't using those packages before you drop the dynamite. 💣
🚨 Want to make friends and learn from peers? You can join our free web developer community here. 🎉