nvm uninstall does not work

Created on 4 Nov 2017  Â·  13Comments  Â·  Source: nvm-sh/nvm

  • Operating system and version:
    MacOS High Sierra v10.13

  • nvm debug output:


nvm --version: v0.33.6
$TERM_PROGRAM: iTerm.app
$SHELL: /bin/zsh
$HOME: /Users/nibo
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
$NVM_NODEJS_ORG_MIRROR: ''
$NVM_IOJS_ORG_MIRROR: ''
shell version: 'zsh 5.3 (x86_64-apple-darwin17.0)'
uname -a: 'Darwin 17.0.0 Darwin Kernel Version 17.0.0: Thu Aug 24 21:48:19 PDT 2017; root:xnu-4570.1.46~2/RELEASE_X86_64 x86_64'
OS version: Mac 10.13 17A405
curl: /usr/bin/curl, curl 7.54.0 (x86_64-apple-darwin17.0) libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
wget: /usr/local/bin/wget, GNU Wget 1.19.1 built on darwin16.6.0.
git: /usr/local/bin/git, git version 2.14.2
grep: grep: aliased to grep  --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn} (grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn}), grep (BSD grep) 2.5.1-FreeBSD
awk: /usr/bin/awk, awk version 20070501
sed: illegal option -- -
usage: sed script [-Ealn] [-i extension] [file ...]
       sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
sed: /usr/bin/sed,
cut: illegal option -- -
usage: cut -b list [-n] [file ...]
       cut -c list [file ...]
       cut -f list [-s] [-d delim] [file ...]
cut: /usr/bin/cut,
basename: illegal option -- -
usage: basename string [suffix]
       basename [-a] [-s suffix] string [...]
basename: /usr/bin/basename,
rm: illegal option -- -
usage: rm [-f | -i] [-dPRrvW] file ...
       unlink file
rm: /bin/rm,
mkdir: illegal option -- -
usage: mkdir [-pv] [-m mode] directory ...
mkdir: /bin/mkdir,
xargs: illegal option -- -
usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements]] [-J replstr]
             [-L number] [-n number [-x]] [-P maxprocs] [-s size]
             [utility [argument ...]]
xargs: /usr/bin/xargs,
nvm current: v6.11.3
which node: $NVM_DIR/versions/node/v6.11.3/bin/node
which iojs: iojs not found
which npm: $NVM_DIR/versions/node/v6.11.3/bin/npm
npm config get prefix: $NVM_DIR/versions/node/v6.11.3
npm root -g: $NVM_DIR/versions/node/v6.11.3/lib/node_modules

  • nvm ls output:

       v0.12.15
         v4.5.0
         v6.9.1
->      v6.11.3
         v7.7.1
         v8.5.0
default -> 6.11.3 (-> v6.11.3)
defualt -> v6 (-> v6.11.3)
node -> stable (-> v8.5.0) (default)
stable -> 8.5 (-> v8.5.0) (default)
iojs -> N/A (default)
lts/* -> lts/boron (-> N/A)
lts/argon -> v4.8.4 (-> N/A)
lts/boron -> v6.11.4 (-> N/A)

  • How did you install nvm? (e.g. install script in readme, homebrew):
    install script in reame: curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash

  • What steps did you perform?
    nvm uninstall v8.5

  • What happened?
    nothing, output nothing

  • What did you expect to happen?
    uninstall v8.5

  • Is there anything in any of your profile files (.bashrc, .bash_profile, .zshrc, etc) that modifies the PATH?

  • If you are having installation issues, or getting "N/A", what does curl -I --compressed -v https://nodejs.org/dist/ print out?


needs followup uninstalling

Most helpful comment

same problem
nvm: 0.34.0 ,mac OS 10.13, zsh 5.3
rm -rf ~/.nvm/versions/node/vx.xx.x/lib/node_modules
then nvm uninstall will success

All 13 comments

@nepaul does it not working with other versions? Does it now working if you switched to use bash shell?

@PeterDaveHello It once worked. Maybe since MacOS High Sierra?

@nepaul what's the output from set -x; nvm uninstall v8.5?

@nepaul I don't think so as I tested it with High Sierra and I got no problem.

@ljharb
set -x; nvm uninstall v8.5 output:
nvm_check_file_permisions .....like below:

+nvm_check_file_permissions:9> nvm_check_file_permissions /Users/username/.nvm/versions/node/v8.5.0/lib/node_modules/json-server/node_modules/[email protected]@http-signature/node_modules/sshpk/node_modules/bcrypt-pbkdf
+nvm_check_file_permissions:1> local ZSH_HAS_NONOMATCH_UNSET
+nvm_check_file_permissions:2> ZSH_HAS_NONOMATCH_UNSET=1
+nvm_check_file_permissions:3> nvm_has setopt
+nvm_has:1> type setopt
+nvm_check_file_permissions:4> ZSH_HAS_NONOMATCH_UNSET=
+nvm_check_file_permissions:4> set +e
+nvm_check_file_permissions:4> nvm_grep nonomatch
+nvm_check_file_permissions:4> setopt
+nvm_grep:1> GREP_OPTIONS='' grep nonomatch
+nvm_check_file_permissions:4> nvm_echo 0
+nvm_echo:1> printf '%s\n' 0
+nvm_check_file_permissions:4> ZSH_HAS_NONOMATCH_UNSET=0
+nvm_check_file_permissions:5> setopt nonomatch
....
...
...

i met the same problem... did you get useful way to solve it? @nepaul

same problem

@scoyzhao not yet.

same problem

@nepaul can you post the whole output here:
https://pastebin.com/

same problem。

same problem
nvm: 0.34.0 ,mac OS 10.13, zsh 5.3
rm -rf ~/.nvm/versions/node/vx.xx.x/lib/node_modules
then nvm uninstall will success

@NineDayForever that suggests you used sudo npm install -g at some point. sudo is never needed with nvm, and doing so will definitely prevent your ability to uninstall.

Was this page helpful?
0 / 5 - 0 ratings