Module Cleaner is a script that helps you find all the node_modules directories under the execution path and gives you the option to delete them.
You can install Module Cleaner using npm or yarn by running the following command:
npm install -g @pakerzhang/module-cleaneror
yarn global add @pakerzhang/module-cleaner-
Open the terminal and navigate to the desired path where you want to search for
node_modulesdirectories. -
Execute the
module-cleanercommand:
module-cleaner-
Module Cleaner will display a list of
node_modulesdirectories found within the execution path. -
You will be prompted to confirm whether you want to delete the
node_modulesdirectories. Choose "Yes" or "No" accordingly.
Here's an example of how to use Module Cleaner:
$ cd /path/to/project
$ module-cleanerModule Cleaner will search for node_modules directories under the /path/to/project directory and present you with the option to delete them.
Module Cleaner is released under the MIT License.