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:
- Install and uninstall under Linux system Node.js
- Error: EPERM: operation not permitted, mkdir ‘D:\nodejs\node_modules\npm\node_cache\_npx‘
- How to delete software completely on MAC
- NPM can’t find D: //nodejs/node all of The solution of sudden_modules/NPM/bin/npm-cli.js
- Mac & how to uninstall LANDesk
- Delete and unload node on MAC
- Unloading and installation of node and NPM of Vue Foundation
- [Solved] gitbook: node_modules\npm\node_modules\graceful-fs\polyfills.js:287
- Uninstall Windows computer software, so that the uninstall is clean
- How to uninstall CUDA driver and toolkit in Mac OS X?
- How to uninstall the software for apple / Mac? What if the software can’t be unloaded?
- NPM and Node.js Version incompatibility
- NPM installs dependent packages and reports an error node gyp rebuild… Solution
- NPM ERR! Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’
- Copy node causes NPM execution error: cannot find module ‘/ / lib / utils/ unsupported.js ‘
- Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’ npm ERR! at Error (native)
- About node error NPM update check failed try running with sudo or get access to the local update
- How can IntelliJ idea completely delete a project
- npm ERR! Error: EPERM: operation not permitted, open ‘C:\Program Files\nodejs\node_ Solution to cache / xxx
- NPM warn optional skipping optional dependency: 1 [email protected] (node_ modules\fsevents):