Deleting Old Node Modules to Save Space Automatically

in #utopia-io7 years ago (edited)

wipemodules.png


I just found this lovely tool that will remove all the node_modules folders automatically. This is very helpful as my computer currently has tons of node_modules folders and take up a lot of my storage. You can get the source code wipe-modules and also can be installed through NPM:

npm install --global wipe-modules 


After you have it installed just run the -h help command to get a list of
options:

    $ wipe-modules --help 


Usage: wipe-modules [path] [days]

Path: The full path of your code directory

Days: The days you want to set to mark projects as inactive

Example: wipe-modules ~/code 90

That will cleanup the node_modules of your ~/code projects whose been inactive for 90 days or more.

This video will demo how the tool works:

asciicast


What a great tool and now I don't have to worry about spacing on my
computer. Also, since all the dependencies should have been saved in my
package.json, all data should be not be losing too.

Coin Marketplace

STEEM 0.09
TRX 0.32
JST 0.033
BTC 108796.16
ETH 3830.07
USDT 1.00
SBD 0.61