Qiita Conference 2025

ミノ駆動 (@MinoDriven)

プロフェッショナルとしての成長──「問題の深掘り」が導く真のスキルアップ

15
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Mac OS X から Node.js をアンインストールする方法

Last updated at Posted at 2016-02-03

アンインストール

下記リンク先の StackOverflow で回答されているコマンドを使用してアンインストールします:

lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom \
| while read i; do
  sudo rm /usr/local/${i}
done
sudo rm -rf /usr/local/lib/node \
     /usr/local/lib/node_modules \
     /var/db/receipts/org.nodejs.*

上記コマンドをコピーしてターミナルに貼り付け実行します。これでインストーラーでインストールした Node.js がシステムから削除されます。

How do I uninstall nodejs installed from pkg (Mac OS X)?

NPM の削除
Node.js は削除されましたが npm コマンドでインストールしたグローバルモジュールはそのままです。

これも削除します:

sudo rm -rf ~/.npm

これでシステムにインストールされた Node.js 関連のファイル全てが削除できます。

Node.js は開発途上のプラットフォームですので、頻繁にアップデートされます。これに柔軟に対応するために以下のようなバージョンマネージャーがあります:

Homebrew
nodebrew
nenv

個人的にはこのようなバージョンマネージャーを使用して Node.js をインストールするのがオススメです!

15
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up

Qiita Conference 2025 will be held!: 4/23(wed) - 4/25(Fri)

Qiita Conference is the largest tech conference in Qiita!

Keynote Speaker

ymrl、Masanobu Naruse, Takeshi Kano, Junichi Ito, uhyo, Hiroshi Tokumaru, MinoDriven, Minorun, Hiroyuki Sakuraba, tenntenn, drken, konifar

View event details
15
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?