or

Uninstalling MacPorts

Recently, I had some issues with MacPorts. I guess I ran some wrong commands.. Anyhow, basically I had to uninstall it. However, I couldn’t find anything to uninstall it. Either I was gonna remove everything one by one, or I had to obtain some scripts from somewhere in the Internet. So I dig into MacPorts site and found what I was looking for. Here is the script to uninstall everything related with MacPorts.

isa@isa ~$ export prefix="/opt/local"
isa@isa ~$ sudo rm -rf ${prefix}
/Applications/MacPorts
/Applications/DarwinPorts
/Library/Tcl/macports1.0
/Library/Tcl/darwinports1.0
/Library/LaunchDaemons/org.macports.*
/Library/StartupItems/DarwinPortsStartup
/Library/Receipts/MacPorts*.pkg
/Library/Receipts/DarwinPorts*.pkg
/etc/manpaths.d/macports
/etc/paths.d/macports

One side note; if you allowed MacPorts to add some files other than /opt, then you might have to delete them by yourself.



One Response

  1. Push Eject

    Thank you for posting this. I was pulling my hair out looking for a way to uninstall that mess. All I wanted was a decent ssh client, for pete’s sake! :)

    August 7, 2009, 7:29 AM

Leave a Reply

Name (required)
Mail (required)
Website