Home  >  Article  >  Web Front-end  >  Command to uninstall node

Command to uninstall node

藏色散人
藏色散人Original
2021-03-01 15:09:5819430browse

The commands to uninstall node are "remove" and "rm -rf". The specific method of uninstalling node is: first use the "sudo apt-get remove nodejs npm" command to delete the node once; then use "rm - rf" command to delete the file.

Command to uninstall node

The operating environment of this article: windows7 system, node14.16 version, Dell G3 computer.

Node is a development platform that allows JavaScript to run on the server side. It makes JavaScript a scripting language on par with server-side languages ​​such as PHP, Python, Perl, and Ruby. Released in May 2009 and developed by Ryan Dahl, it essentially encapsulates the Chrome V8 engine.

Let’s take a look at how to uninstall node using commands:

Use package management to delete it first

sudo apt-get remove nodejs npm

Manual cleanup

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

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

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

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 deletion is completed, restart the terminal and enter node -v to see if it is OK

Recommendation: "node video tutorial"

The above is the detailed content of Command to uninstall node. 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