CentOS 8.5にNode.jsとnpmをアンインストールする

2021年12月22日

環境
# cat /etc/redhat-release
CentOS Linux release 8.5.2111

操作方法
1.Node.js のインストール場所を確認します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# which node
/usr/bin/node
# which node /usr/bin/node
# which node
/usr/bin/node

2.dnfでnodejsアンインストールを実行します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# sudo dnf -y remove nodejs
# sudo dnf -y remove nodejs
# sudo dnf -y remove nodejs

3.ターミナルから以下のコマンドで削除確認

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# node -v
-bash: /usr/bin/node: No such file or directory
# npm -v
/usr/bin/env: ‘node’: No such file or directory
# node -v -bash: /usr/bin/node: No such file or directory # npm -v /usr/bin/env: ‘node’: No such file or directory
# node -v
-bash: /usr/bin/node: No such file or directory
# npm -v
/usr/bin/env: ‘node’: No such file or directory

 

CentOS8

Posted by arkgame