New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to uninstall nvm? #298

Closed
mehulkar opened this Issue Sep 24, 2013 · 27 comments

Comments

Projects
None yet
@mehulkar

mehulkar commented Sep 24, 2013

I want to uninstall nvm completely. Is there documentation on how to do this?

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Sep 25, 2013

Collaborator

Essentially you'd need to reverse the steps in install.sh - remove any nvm lines from ~/.bash_profile (and/or ~/.profile), rm -rf ~/.nvm, and either reopen your shell, or re-source your bash profile.

However, simply removing the nvm commands from your .bash_profile or .profile should be more than sufficient.

Collaborator

ljharb commented Sep 25, 2013

Essentially you'd need to reverse the steps in install.sh - remove any nvm lines from ~/.bash_profile (and/or ~/.profile), rm -rf ~/.nvm, and either reopen your shell, or re-source your bash profile.

However, simply removing the nvm commands from your .bash_profile or .profile should be more than sufficient.

@mibamur

This comment has been minimized.

Show comment
Hide comment
@mibamur

mibamur Dec 15, 2013

Contributor

@mehulkar

just remove directory

rm -rf ~/.nvm
rm -rf ~/.npm
rm -rf ~/.bower

and as ljharb say find and remove line source ~/.nvm from yours .bashrc or .zshrc

@creationix please close this issue

Contributor

mibamur commented Dec 15, 2013

@mehulkar

just remove directory

rm -rf ~/.nvm
rm -rf ~/.npm
rm -rf ~/.bower

and as ljharb say find and remove line source ~/.nvm from yours .bashrc or .zshrc

@creationix please close this issue

@mehulkar mehulkar closed this Dec 16, 2013

@koenpunt

This comment has been minimized.

Show comment
Hide comment
@koenpunt

koenpunt Dec 16, 2013

Contributor

@mibamur There is no need for such emphasis in your comments. And it is probably better to use the $NVM_DIR variable, as not everyone has nvm installed in ~/.nvm.

Oneliner:

rm -rf $NVM_DIR ~/.npm ~/.bower
Contributor

koenpunt commented Dec 16, 2013

@mibamur There is no need for such emphasis in your comments. And it is probably better to use the $NVM_DIR variable, as not everyone has nvm installed in ~/.nvm.

Oneliner:

rm -rf $NVM_DIR ~/.npm ~/.bower
@mibamur

This comment has been minimized.

Show comment
Hide comment
@mibamur

mibamur Dec 16, 2013

Contributor

@koenpunt yeh, you right

Contributor

mibamur commented Dec 16, 2013

@koenpunt yeh, you right

@mehulkar

This comment has been minimized.

Show comment
Hide comment
@mehulkar

mehulkar Dec 16, 2013

Thank you!

mehulkar commented Dec 16, 2013

Thank you!

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Dec 16, 2013

Collaborator

To ensure this isn't found by someone unwitting: you do not need to do anything to ~/.npm or ~/.bower - you'll be needlessly blowing away caches.

To uninstall npm with the smallest possible impact, only remove the source lines from your profile. You may also rm -rf $NVM_DIR if you like but it's not necessary.

Collaborator

ljharb commented Dec 16, 2013

To ensure this isn't found by someone unwitting: you do not need to do anything to ~/.npm or ~/.bower - you'll be needlessly blowing away caches.

To uninstall npm with the smallest possible impact, only remove the source lines from your profile. You may also rm -rf $NVM_DIR if you like but it's not necessary.

@koenpunt

This comment has been minimized.

Show comment
Hide comment
@koenpunt

koenpunt Dec 16, 2013

Contributor

@ljharb Ah you're right, it's about uninstalling nvm, not node. Although by removing the nvm directory you'll remove node as well.

Contributor

koenpunt commented Dec 16, 2013

@ljharb Ah you're right, it's about uninstalling nvm, not node. Although by removing the nvm directory you'll remove node as well.

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Dec 16, 2013

Collaborator

@koenpunt not if node is also installed globally. I install node from source globally (which is simply running 4 commands in the repo) but use nvm to manage it for my user profile, and I definitely run shells with nvm deactivate so I can use my global node.

Collaborator

ljharb commented Dec 16, 2013

@koenpunt not if node is also installed globally. I install node from source globally (which is simply running 4 commands in the repo) but use nvm to manage it for my user profile, and I definitely run shells with nvm deactivate so I can use my global node.

@scott-joe

This comment has been minimized.

Show comment
Hide comment
@scott-joe

scott-joe Oct 29, 2015

For additional info, nvm may be installed via Homebrew or npm. Check your installed packages for the proper way to remove the binary files.

scott-joe commented Oct 29, 2015

For additional info, nvm may be installed via Homebrew or npm. Check your installed packages for the proper way to remove the binary files.

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Oct 29, 2015

Collaborator

@scott-joe nvm should never be installed via homebrew - it's entirely unsupported. See #469. In addition, the nvm on npm is NOT the correct one, and will not work anyways - see #304.

Collaborator

ljharb commented Oct 29, 2015

@scott-joe nvm should never be installed via homebrew - it's entirely unsupported. See #469. In addition, the nvm on npm is NOT the correct one, and will not work anyways - see #304.

@hirofumii hirofumii referenced this issue Dec 10, 2015

Closed

n #72

@trusktr

This comment has been minimized.

Show comment
Hide comment
@trusktr

trusktr Jan 5, 2016

What's the reasoning for not hosting nvm on npm? This would make nvm easy to uninstall with npm uninstall -g nvm.

trusktr commented Jan 5, 2016

What's the reasoning for not hosting nvm on npm? This would make nvm easy to uninstall with npm uninstall -g nvm.

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Jan 5, 2016

Collaborator

@trusktr it's not "reasoning", it's that it's a different project that's now deprecated. I've been given ownership of it, and at some point in the future (see #304), I'll replace it with something that bootstraps the proper nvm.

Also, when using nvm, npm is managed by nvm. Uninstalling nvm would delete npm. Why would it make any sense to uninstall nvm with a tool that nvm installed for you?

Collaborator

ljharb commented Jan 5, 2016

@trusktr it's not "reasoning", it's that it's a different project that's now deprecated. I've been given ownership of it, and at some point in the future (see #304), I'll replace it with something that bootstraps the proper nvm.

Also, when using nvm, npm is managed by nvm. Uninstalling nvm would delete npm. Why would it make any sense to uninstall nvm with a tool that nvm installed for you?

@trusktr

This comment has been minimized.

Show comment
Hide comment
@trusktr

trusktr Jan 5, 2016

It might not make sense. It'd just be nice to uninstall it easily. Maybe it can prompt at the command like something like "This will uninstall versions of node installed by nvm too. Continue?".

trusktr commented Jan 5, 2016

It might not make sense. It'd just be nice to uninstall it easily. Maybe it can prompt at the command like something like "This will uninstall versions of node installed by nvm too. Continue?".

@trusktr

This comment has been minimized.

Show comment
Hide comment
@trusktr

trusktr Jan 5, 2016

Wait, I'm not even sure that's possible. Oh well, I was able to remove it manually any ways, and I can use Arch Linxu's pacman to see which files don't belong to any package and remove those too.

trusktr commented Jan 5, 2016

Wait, I'm not even sure that's possible. Oh well, I was able to remove it manually any ways, and I can use Arch Linxu's pacman to see which files don't belong to any package and remove those too.

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Jan 5, 2016

Collaborator

it's pretty simple. rm -rf $NVM_DIR and remove the two lines in your profile file.

Collaborator

ljharb commented Jan 5, 2016

it's pretty simple. rm -rf $NVM_DIR and remove the two lines in your profile file.

@michaeltyhuang

This comment has been minimized.

Show comment
Hide comment
@michaeltyhuang

michaeltyhuang commented Feb 23, 2016

@ljharb it works

@chovy

This comment has been minimized.

Show comment
Hide comment
@chovy

chovy Sep 8, 2016

can we get an nvm uninstall-nvm command?

chovy commented Sep 8, 2016

can we get an nvm uninstall-nvm command?

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Sep 8, 2016

Collaborator

@chovy that would require modifying one or more of your profile files, otherwise it'd just be rm -rf "$NVM_DIR" - that's pretty destructive, and not something I'd want to encourage.

Disk space is cheap, so the best way to uninstall it is to simply disable it by removing the sourcing lines from your profile files - which has to be done manually.

Collaborator

ljharb commented Sep 8, 2016

@chovy that would require modifying one or more of your profile files, otherwise it'd just be rm -rf "$NVM_DIR" - that's pretty destructive, and not something I'd want to encourage.

Disk space is cheap, so the best way to uninstall it is to simply disable it by removing the sourcing lines from your profile files - which has to be done manually.

@jcubic

This comment has been minimized.

Show comment
Hide comment
@jcubic

jcubic Jan 2, 2017

I've removed the directory (on Windows 7) and I still can execute nvm from git bash, what going on?

jcubic commented Jan 2, 2017

I've removed the directory (on Windows 7) and I still can execute nvm from git bash, what going on?

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Jan 2, 2017

Collaborator

@jcubic you may need to restart git bash and/or Windows. Sourced shell functions stay in memory even if the files are deleted.

Collaborator

ljharb commented Jan 2, 2017

@jcubic you may need to restart git bash and/or Windows. Sourced shell functions stay in memory even if the files are deleted.

@hzbd

This comment has been minimized.

Show comment
Hide comment
@hzbd

hzbd Mar 30, 2017

step1 - check env:

[root@demo tatia]# echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/.nvm/versions/node/v6.2.2/bin

step2 (remove nvm env from envs):

export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

then, remove /root/.nvm/*
done.

hzbd commented Mar 30, 2017

step1 - check env:

[root@demo tatia]# echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/.nvm/versions/node/v6.2.2/bin

step2 (remove nvm env from envs):

export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

then, remove /root/.nvm/*
done.

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Mar 30, 2017

Collaborator

@sconts to uninstall, yes. when installed, however, the nvm paths should be first, or else it won't work properly. (however, nvm unload and nvm deactivate both remove it for you)

Collaborator

ljharb commented Mar 30, 2017

@sconts to uninstall, yes. when installed, however, the nvm paths should be first, or else it won't work properly. (however, nvm unload and nvm deactivate both remove it for you)

@myisjon

This comment has been minimized.

Show comment
Hide comment
@myisjon

myisjon Apr 23, 2017

rm -rf $NVM_DIR ~/.npm ~/.bower && unset NVM_DIR

myisjon commented Apr 23, 2017

rm -rf $NVM_DIR ~/.npm ~/.bower && unset NVM_DIR

@ljharb

This comment has been minimized.

Show comment
Hide comment
@ljharb

ljharb Apr 23, 2017

Collaborator

@myisjon ~/.npm and ~/.bower are for npm and bower, respectively; you don't necessarily want to ~/.npm when removing nvm. (of course, you'll want to remove bower in every case)

Collaborator

ljharb commented Apr 23, 2017

@myisjon ~/.npm and ~/.bower are for npm and bower, respectively; you don't necessarily want to ~/.npm when removing nvm. (of course, you'll want to remove bower in every case)

@franklinyu

This comment has been minimized.

Show comment
Hide comment
@franklinyu

franklinyu Aug 2, 2017

How about adding this in README?

franklinyu commented Aug 2, 2017

How about adding this in README?

@cdock1029

This comment has been minimized.

Show comment
Hide comment
@cdock1029

cdock1029 Mar 29, 2018

Please add uninstall instructions to the README. One preference for using package managers to install node or anything else is ease of removal. Should be explicitly defined somewhere the best practice in completely removing it...

cdock1029 commented Mar 29, 2018

Please add uninstall instructions to the README. One preference for using package managers to install node or anything else is ease of removal. Should be explicitly defined somewhere the best practice in completely removing it...

@franklinyu

This comment has been minimized.

Show comment
Hide comment
@franklinyu

franklinyu Mar 29, 2018

#1134 did it, but it has not yet been merged.

franklinyu commented Mar 29, 2018

#1134 did it, but it has not yet been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment