npm i -g dirkill
dirkill will list all matched directories under the current directory and ask for confirmation before deleting.
dirkill dir_name
Specify the directories to skip. It's helpful to improve performance and the default value is "node_modules".
dirkill dir_name -s node_modules,dist