How to remove unused npm modules


0


In this post, we will see how to find the unused npm packages.

Installing the package

To find the unused npm packages, we need to install an npm module
Run the below command to install depcheck


If you use yarn, run below


Now go to the root directory of your project and run the below command


The above command prints all the unused npm packages in your project


You can uninstall all the unused packages like below


or