loading...
Cover image for Remove unused npm modules in less than 30 seconds!

Remove unused npm modules in less than 30 seconds!

manitej profile image Manitej ⚡ ・1 min read

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>

Discussion

pic
Editor guide