1

I am trying to remove the package download of npm and node that I installed to install them with Homebrew instead. However I am having great difficulty in doing this. How can I get the package version of node.js and npm totally removed from my Mac so I can install the Homebrew version?

Note: I have tried sudo npm rm --global node however I get the error sudo: npm: command not found

Kern Elliott
  • 1,659
  • 5
  • 41
  • 65

1 Answers1

-1

check the link below for uninstalling node/npm

How do I uninstall nodejs installed from pkg (Mac OS X)?

and the brew error is happening due to permmision issue. Since brew basically don't allow to be executed with sudo so change the directory permission before brew command.

changing permission:

sudo chown -R $USER:admin /usr/local

brew link command:

brew link node

and then you can use npm or node commands.

Community
  • 1
  • 1
suish
  • 3,253
  • 1
  • 15
  • 34