npm i -g pruner-cli prune # or use npx npx pruner-cli
Full usage see prune -h:
Prune node_modules files and save disk space Usage: prune <path> Options: --version, -v Show version number [boolean] --config, -c <filename> config file name [string] [default: ".prune.json"] --dryrun, -d dry run [boolean] [default: "false"] --verbose log pruned file info [boolean] [default: "false"] --help, -h Show help [boolean]
Create a local .prune.json to customize, character case doesn't matter. Defaults are: