Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 849 Vote(s) - 3.55 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)

#1
<!-- language-all: lang-none -->

My version of node is always v0.6.1-pre even after I install brew node and NVM install v0.6.19.

My node version is:

node -v
v0.6.1-pre

NVM says this (after I install a version of node for the first time in one bash terminal):

nvm ls
v0.6.19
current: v0.6.19

But when I restart bash, this is what I see:



nvm ls
v0.6.19
current: v0.6.1-pre
default -> 0.6.19 (-> v0.6.19)

So where is this phantom node 0.6.1-pre version and how can I get rid of it? I'm trying to install libraries via NPM so that I can work on a project.

I tried using BREW to update before NVM, using `brew update` and `brew install node`.
I've tried deleting the "node" directory in my `/usr/local/include` and the "node" and "node_modules" in my `/usr/local/lib`.
I've tried uninstalling npm and reinstalling it following [these][1] instructions.


All of this because I was trying to update an older version of node to install the "zipstream" library. Now there's folders in my users directory, and the node version STILL isn't up to date, even though NVM says it's using 0.6.19.

**Ideally, I'd like to uninstall nodejs, npm, and nvm, and just reinstall the entire thing from scratch on my system.**


[1]:

[To see links please register here]

Reply

#2
maybe you need to make

hash -r
it helps with problem of symlink

$ node -v
$ bash: /opt/local/bin/node: No such file or directory
Reply

#3
downgrade node to 0.10.36

sudo npm cache clean -f
sudo npm install -g n
sudo n 0.10.36

upgrade node to stable v

sudo npm cache clean -f
sudo npm install -g n
sudo n stable
Reply

#4
I had installed Node.js from source downloaded from the git repository. I installed with:

./configure
$ make
$ sudo make install

Because the make file supports it, I can do:

$ sudo make uninstall

Reply

#5
1. First:

lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done

sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*

2. To recap, the best way (I've found) to completely uninstall node + npm is to do the following:

go to `/usr/local/lib` and delete any node and node_modules

cd /usr/local/lib

sudo rm -rf node*

3. go to `/usr/local/include` and delete any node and node_modules directory

cd /usr/local/include

sudo rm -rf node*


4. if you installed with `brew install node`, then run `brew uninstall node` in your terminal

brew uninstall node

5. check your Home directory for any "local" or "lib" or "include" folders, and delete any "node" or "node_modules" from there

go to /usr/local/bin and delete any node executable

cd /usr/local/bin

sudo rm -rf /usr/local/bin/npm

ls -las


6. You may need to do the additional instructions as well:

sudo rm -rf /usr/local/share/man/man1/node.1

sudo rm -rf /usr/local/lib/dtrace/node.d

sudo rm -rf ~/.npm


Source: [tonyMtz]()
Reply

#6
Expanding on [Dominic Tancredi's awesome answer][1], I've rolled this into a bash package and stand-alone script. If you are already using the "Back Package Manager" called [bpkg](

[To see links please register here]

) you can install the script by running:

bpkg install -g brock/node-reinstall

Or you can have a look at the script on Github at [brock/node-reinstall](

[To see links please register here]

). The script allows you to re-install node using nvm or nave, and to specify a node version as your default.

[1]:

[To see links please register here]

"Dominic Tancredi"
Reply

#7
Additional to the main answer I needed to remove all npm instances found in:

rm -rf /usr/local/share/man/man1/npm*


Reply

#8
(server: ubuntu 14)

1.) install nvm (node version manager)

[To see links please register here]


2.) nvm install node

3.) npm -v
(inquire npm version => 3.8.6)

4.) node -v
(inquire node version => v6.0.0)
Reply

#9
You can clone

[To see links please register here]

and run the simple command as given in the repository.After that just restart your system.
This is the simplest method and also worked for me.
Reply

#10
I'm not sure if it's because I had an old version (4.4.5), or if it's because I used the official installer, but most of the files referenced in other answers didn't exist on my system. I only had to remove the following:

~/.node-gyp
~/.node_repl_history
/usr/local/bin/node
/usr/local/bin/npm
/usr/local/include/node
/usr/local/lib/dtrace/node.d
/usr/local/lib/node_modules
/usr/local/share/doc/node
/usr/local/share/man/man1/node.1
/usr/local/share/systemtap/tapset/node.stp

I decided to keep `~/.npm` because I was planning on reinstalling Node with Homebrew.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through