To remove packages in node_modules/
in bulk, you could also remove them from package.json
, save it, and then run npm prune
on the terminal.
This will remove those packages, which exist in the filesystem, but are not used/declared package.json
.
P.S> This is particularly useful on Windows, as you may often encounter problems with being unable to delete some files due to the "exceeded path length limit".