You can use the reinstall module found in npm.
After installing it, you can use the following command:
reinstall
The only difference with manually removing node_modules
folder and making npm install
is that this command automatically clear npm's cache. So, you can get three steps in one command.
upd: npx reinstall
is a way to run this command without globally installing package (only for npm5+)