$ go get github.com/tj/node-prune/cmd/node-prune
In your app directory:
$ node-prune
files total 25,042
files removed 5,851
size removed 21 MB
duration 433ms
Somewhere else:
$ node-prune path/to/node_modules
files total 25,042
files removed 5,851
size removed 21 MB
duration 433ms
node-prune is a small tool to prune unnecessary files from ./node_modules.