Linux Uninstall Install node NPM

Source: Internet
Author: User
Tags install node

1. Uninstall Node NPM

(1) Uninstall NPM First:

sudo npm uninstall npm-g

(2) then uninstall node. js.

(2.1) If it is an Ubuntu system and is installed using Apt-get, you can use the command:

sudo apt-get Remove Nodejs

(2.2) Source file installation node, uninstall mode: first CD to Unzip to the directory:

sudo make Uninstall

(2.3) A brew-installed node (Brew install node) under the Mac platform, with the Uninstall method:

1. Uninstall using the Brew uninstall Node command
2. Execute commands under Terminal, uninstall node other related directory

  sudo rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*}

3. Execute the brew Doctor command to see what else is in the directory associated with node, NPM, and delete. Previously, because of the lack of this step, has not been completely uninstalled.

2. Install node NPM

node. JS official download page: https://nodejs.org/en/download/current/

I chose the latest version, yes: https://nodejs.org/dist/v6.3.1/node-v6.3.1.tar.gz

General third-party software on Linux installation directory is/usr/local, use wget download source code (address their own attention to replace):

sudo wget http://nodejs.org/dist/v0.10.30/node-v0.10.30.tar.gz

Unzip:

Tar xzvf node-v* && CD node-v*

Compile:

./configuremake

This process may be slow, wait for completion, and then install:

sudo make install

If all goes well, node. JS is installed, use Node-v to view the version.

(2) Installing NPM:

NPM Install

Linux Uninstall Install node NPM

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.