Linux 명령 행을 사용하여 Node.JS를 설치 제거 하시겠습니까?
리눅스에서 cmd 줄을 사용하여 node.js를 어떻게 제거합니까?
Running which node
은와 같은 것을 반환합니다 /path/bin/node
.
그런 다음 실행 cd /path
이것이 Node.JS에 의해 추가 된 전부입니다.
rm -r bin/node bin/node-waf include/node lib/node lib/pkgconfig/nodejs.pc share/man/man1/node.1
이제 내가 모르는 유일한 것은 npm과 그것이 설치 한 것입니다. 비어있는 것으로 시작하는 사용자 정의 경로에 npm을 다시 설치하면 추가 된 내용을 볼 수 있으며 노드에 대해 작성한 위의 목록과 유사한 npm 목록을 만들 수 있습니다.
에서 우분투 12.04 단순히이 입력
$ sudo apt-get remove nodejs
nodejs와 npm 도 간단 하게 제거 합니다.
소스에서 설치 한 경우 다음 명령을 발행 할 수 있습니다.
sudo make uninstall
https://github.com/nodejs/node/wiki 의 지시 사항에 따라 $ HOME / local / node에 설치 한 경우 위 행 앞에 다음을 입력해야합니다.
./configure --prefix=$HOME/local/node
더 이상 소스가 없기 때문에 노드를 제거하기 위해 @George가 허용 한 답변을 따랐습니다.
sudo npm rm npm -g
즉 같은 시스템 디렉토리에서 NPM을 없애 듯 /usr/bin/npm
하고 /usr/lib/npm
. 여기 에서 명령을 받았습니다 . 그런 다음 ~/.npm
수동으로 삭제 한 디렉토리 를 찾았습니다 . 솔직히 나는 npm의 모든 흔적이 제거되었는지 알지 못하지만 다른 것을 찾을 수는 없습니다.
curl
+를 사용하여 노드를 설치 한 경우 yum
:
sudo curl --silent --location https://rpm.nodesource.com/setup_4.x | bash -
sudo yum -y install nodejs
그런 다음 다음을 사용하여 제거 할 수 있습니다 yum
.
sudo yum remove nodejs
curl
스크립트 를 사용하면 잘못된 버전의 노드가 설치됩니다. 스크립트에 사용 된 경로가 의도 한 v4.x 대신 v6.7을 설치 하는 버그 가 node
있습니다 .(../setup_4.x)
curl
컴퓨터에서 노드를 완전히 제거하려는 경우 George Bailey의 대답이 매우 잘 작동합니다.
이 답변은 @tedeh https://github.com/nodesource/distributions/issues/486 에서 참조됩니다.
새 버전의 노드를 설치하려면 아래 코드를 사용해야합니다
sudo rm -rf /var/cache/yum
sudo yum remove -y nodejs
sudo rm /etc/yum.repos.d/nodesource*
sudo yum clean all
그리고 새로운 버전의 노드를 "yum"하기 위해 새로운 nodejs 버전을 추가하십시오
#using this command for Node version 8
curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
#using this command for Node version 10
curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash -
nodejs 설치
sudo yum -y install nodejs
나는 그것이 당신에게 도움이되기를 바랍니다!
This is better to remove NodeJS and its modules manually because installation leaves a lot of files, links and modules behind and later it create problems while we reconfigure another version of NodeJS and its modules. Run the following commands.
sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* /usr/local/lib/dtrace/node.d ~/.npm ~/.node-gyp /opt/local/bin/node opt/local/include/node /opt/local/lib/node_modules
sudo rm -rf /usr/local/lib/node*
sudo rm -rf /usr/local/include/node*
sudo rm -rf /usr/local/bin/node*
and this done.
A step by step guide with commands is at http://amcositsupport.blogspot.in/2016/07/to-completely-uninstall-node-js-from.html
This helped me resolve my problem.
if you want to just update node, there's a neat updater too
https://github.com/creationix/nvm
to use,
git clone git://github.com/creationix/nvm.git ~/.nvm
source ~/.nvm/nvm.sh
nvm install v0.4.1
The answer of George Bailey works fine. I would just add the following flags and use sudo if needed:
sudo rm -rf bin/node bin/node-waf include/node lib/node lib/pkgconfig/nodejs.pc share/man/man1/node
after installing using the "ROCK-SOLID NODE.JS PLATFORM ON UBUNTU" script, i get this output. Which tells you how to uninstall nodejs.
Done. The new package has been installed and saved to
/tmp/node-install/node-v0.8.19/nodejs_0.8.19-1_i386.deb
You can remove it from your system anytime using:
dpkg -r nodejs
I think this works, at least partially (have not investigated): nvm uninstall <VERSION_TO_UNINSTALL>
eg:
nvm uninstall 4.4.5
Best way to go around this is to do it right from the BEGINNING:
INSTALL BREW
#HERE IS HOW: PASTE IN TERMINAL
sudo apt-get install build-essential curl git m4 ruby texinfo libbz2-dev libcurl4-openssl-dev libexpat-dev libncurses-dev zlib1g-dev
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"
Then at the end of your .bashrc file(In your home directory press Ctrl + H)
export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
Then restart terminal so the modification to .bashrc are reloaded
TO INSTALL NODE
brew install node
TO CHECK VERSION
node -v
npm -v
TO UPDATE NODE
brew update
brew upgrade node
TO UNINSTALL NODE
brew uninstall node
참고URL : https://stackoverflow.com/questions/5650169/uninstall-node-js-using-linux-command-line
'Programing' 카테고리의 다른 글
@property는 Objective-C에서 비 원자 유지, 할당, 복사, (0) | 2020.05.01 |
---|---|
Java를 사용하여 문자열의 첫 글자를 대문자로 바꾸는 방법은 무엇입니까? (0) | 2020.05.01 |
누군가 SQL 쿼리를 저작권으로 보호 할 수 있습니까? (0) | 2020.05.01 |
보다 큼 /보다 큼에 대한 스위치 설명 (0) | 2020.05.01 |
5 살짜리에게 의존성 주입을 설명하는 방법? (0) | 2020.05.01 |