NVM is installed under ~/. NVM
is not installed with the previous one. I am a little obsessive, so I want to uninstall the previous one
Homebrew installed
brew uninstall node
The official website downloads the PKG installation package
A command
sudo rm - rf/usr/local/{bin/{node, NPM}, lib/node_modules/NPM, lib/node, share/man/*/node. *} code>
It was installed in another way
Make a script, the need to delete the file, a shuttle all kill
It will be called: uninstallNode. sh
#!/bin/bash
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom \
| while read i; do
sudo rm /usr/local/${i}
done
sudo rm -rf /usr/local/lib/node \
/usr/local/lib/node_modules \
/var/db/receipts/org.nodejs.*
Modify file permissions chmod 777 uninstallnodejs.sh
is executed on the command line
When you're done deleting all that stuff, you're done deleting node.
but there are a lot of node-based installed software and command-line tools that need to be reinstalled, such as react-native, supervisor,pm2 etc
need to delete the files under /usr/local/bin
, actually they are just soft connections, it's all under /usr/local/lib/node_modules/
.
was removed in the previous step, but you can still find it by pressing the TAB key because these soft connections still exist
Read More:
- Delete and unload node on MAC
- Install and uninstall under Linux system Node.js
- Installing and uninstalling nodejs in Linux
- Unloading and installation of node and NPM of Vue Foundation
- Error: EPERM: operation not permitted, mkdir ‘D:\nodejs\node_modules\npm\node_cache\_npx‘
- Local workspace file (‘angular.json’) could not be found.
- How to solve the problem of Cannot find module’npmlog’ when installing nodejs under Linux
- Using NPM to install Remix error in Windows 10
- Some mistakes in using NPM
- The version number of robot JS running by electron does not match
- macOS Install Homebrew Error LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
- NPM install error | gyp err! Configure error
- Error: no such keg: / usr / local / cellular / node & install NVM & Brew install & oh my Zsh. Git install & git set alias & no bundle URL press
- Node configuration environment variable and global installation of webapck
- Node.js Cannot find module ‘mysql’ ‘express’
- “NPM err! Error: eperm: operation not permitted” problem solving
- NPM installs dependent packages and reports an error node gyp rebuild… Solution
- Solution to node sass installation failure
- NPM ERR! Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’
- gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildPr