Home  >  Article  >  Web Front-end  >  What is the node uninstall command?

What is the node uninstall command?

青灯夜游
青灯夜游Original
2021-03-05 13:47:3315088browse

The node uninstall command is "sudo apt-get remove nodejs npm". Uninstall method: First use the command to delete once; then enter the "local", "lib", and "include" folders under "usr" and delete all nodes and node_modules inside.

What is the node uninstall command?

The operating environment of this article: windows7 system, nodejs16 version, Dell G3 computer

How to uninstall node using the uninstall command

Use package management to delete once

sudo apt-get remove nodejs npm

Manual cleanup

Enter /usr/local/lib and delete all node and node_modules folders

Enter /usr /local/include Delete all node and node_modules folders

Check the "local" "lib" "include" folder in the ~ folder, and then delete all "node" and "node_modules" folders in it

Use the following command to find

find ~/ -name node
find ~/ -name node_modules

Use the following command to delete the file

sudo rm /usr/local/bin/node
sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf /usr/local/bin/npm
sudo rm -rf /usr/local/share/man/man1/node.1
sudo rm -rf /home/[homedir]/.npm
sudo rm -rf /usr/local/include/node/
sudo rm -rf /home/[homedir]/.node-*

After the deletion is completed, restart the terminal and enter node -v to see if it is OK

Related Recommended: "nodejs tutorial"

The above is the detailed content of What is the node uninstall command?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn