uninstall npm from terminal code example
Example 1: brew uninstall node
brew uninstall node;
which node;
sudo rm -rf /usr/local/bin/node;
sudo rm -rf /usr/local/lib/node_modules/npm/;
brew doctor;
brew cleanup --prune-prefix;
Example 2: how to globally uninstall npm package
npm uninstall -g <@scope/package_name>