MacPorts のアンインストール方法

MacPorts のアンインストール方法

Mac OS X のパッケージ管理システム Mac Ports のアンインストール方法をまとめます。

MacPorts は通常のアプリケーションと違い,/Application ディレクトリのファイルを削除するだけではアンインストールできず,ターミナル上で作業する必要があります。

1. Mac Ports にインストールされた全てのパッケージをアンインストール

[bash]
sudo port -fp uninstall –follow-dependents installed
[/bash]

2. Mac Ports の本体や設定ファイル等の削除

[bash]
sudo rm -rf
/opt/local
/Applications/DarwinPorts
/Applications/MacPorts
/Library/LaunchDaemons/org.macports.*
/Library/Receipts/DarwinPorts*.pkg
/Library/Receipts/MacPorts*.pkg
/Library/StartupItems/DarwinPortsStartup
/Library/Tcl/darwinports1.0
/Library/Tcl/macports1.0
~/.macports
[/bash]

以上で基本的なアンインストール作業は終わりです。

あとは,各ユーザのディレクトリに作成されている .bash_profile の Mac Ports に関係する PATH 部分を消せば完全に削除できたといえます。