Nodejs packages can be daunting sometimes. When you are knee deep developing Nodejs projects, you will have tons of packages installed globally. Its good to clean up those unwanted packages regularly to keep your disk clean and neat!
The following command will list all the global packages installed.
npm list -g --depth 0
This will result in an output something like this
$ npm list -g --depth 0
Remove Global Package
From the global packages list above, say we want to remove the caprover package. We can use the below command to do the same
npm r -g caprover
That’s it! Make it a regular schedule to clean up your npm packages to clean your disk clean and lean.