Get the App
SLTechnology News&Howtos  ›  Development  › 

How to completely uninstall node and npm methods under mac

Shulou Source: shulou.com Published: 2022-06-03 10:43:15 11月15日 Update

This article mainly introduces how to completely uninstall node and npm methods under mac, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

Npm uninstall sudo npm uninstall npm-g

If you encounter this sentence can not uninstall the npm pit, do not worry, the blogger has another way, ha, continue to look down

First, we need to access the folder where npm is located.

Cd / usr/local/lib/node_modules/npm

Next, we execute it under the npm file.

Sudo make uninstall

Next, if we see this interface, it means that we have uninstalled successfully.

Npm-v test shows that not found shows that the uninstall is really successful.

Node.js Uninstall sudo rm-rf / usr/local/lib/node / usr/local/lib/node_modules / var/db/receipts/org.nodejs.* sudo rm-rf / usr/local/include/node / Users/$USER/.npm sudo rm / usr/local/bin/node sudo rm / usr/local/share/man/man1/node.1 sudo rm / usr/local/lib/dtrace/node.d

Verify that it is successful

If you have executed the above code in order, then we need to verify that we have deleted it successfully.

If there is a result, it means we have deleted it successfully.

With the same verification method, node-v shows the following interface, which shows that we have successfully uninstalled it.

Nodejs npm reinstall official website and download again

Https://nodejs.org/en/download/current/

Thank you for reading this article carefully. I hope the article "how to uninstall node and npm methods under mac" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Success article method verification next file interface if worry code value interest method at the same time is location folder more friends knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info MariaDB Linux OPPO Reno Redmi