Remove unused npm modules in less than 30 seconds!

Subscribe to my newsletter and never miss my upcoming articles

In this quick tutorial, I'll tell you how you can find the unused npm modules in your project and remove them.

Go to the project's root folder and run the below command,

npx depcheck

It will display all the unused packages in your project.

To uninstall a module simply run the below command

npm uninstall <package>

or

yarn remove <package>

Comments (2)

Vivek Tiwari's photo

This is cool. Thanks for sharing.

Manitej Pratha's photo

Glad if it helped you