0

I have tried the standard

brew uninstall node

and even went to /usr/local/ to delete the files according to this post: How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)

I have received a bunch of error messages but when I type

node -v

I still get v8.9.4. I can't seem to uninstall it. I'm trying to get to version v6.10.0. Now when I type brew uninstall node it gives the error

Error: No such keg: /usr/local/Cellar/node

What more do I need to do?

1 Answers1

2

I recommend figuring out where your node is. To do this type:

 which node

If you installed it via homebrew:

 brew uninstall node

If installed via nvm

You can uninstall a specific version

 nvm ls
 nvm uninstall 10.4.1

or get rid of nvm and node entirely

 rm -rf ~/.nvm

and remove all references to NVM in your bash profile.

John Ottenlips
  • 871
  • 13
  • 19
  • Okay, I did that and did brew install node@6 it says node is installed when I check with brew but when I try to run node or try node -v I have the error of -bash: /Users/alexanderkeefe/.nvm/versions/node/v8.9.4/bin/node: No such file or directory – Alexander Keefe Oct 15 '18 at 19:39
  • Try reinstalling nvm `brew install nvm`, you can use it to manage specific versions of node `nvm install 6.0.0`. You may want to source your profile again as well (close and open your terminal window). – John Ottenlips Oct 15 '18 at 19:44
  • 1
    oh, I think that helped. I also ended up going to this page https://nodejs.org/en/blog/release/v6.10.0/ to get the installer wizard instead of doing it from the command line. Thanks so much! – Alexander Keefe Oct 15 '18 at 19:51
  • 1
    No problem, I definitely recommend NVM to manage your different node versions. Cheers! – John Ottenlips Oct 15 '18 at 19:53
  • Mine is in `/usr/local/bin/node` – Jonny Dec 26 '18 at 06:23
  • @Jonny Did you install node via homebrew? If so, you can brew uninstall node. Then I recommend using the nvm package to manage your node versions. – John Ottenlips Dec 26 '18 at 15:59
  • Don't really remember how/when I installed node Manually removing files and installing using brew now and I always get this: "Warning: The post-install step did not complete successfully". So, I'll try to install using NVM for now. – Jonny Dec 27 '18 at 01:01
  • Nvm is definitely the way to go. Cheers! – John Ottenlips Dec 27 '18 at 01:19