I have installed MacPorts on my Mac OS X Lion, and I would like to remove it. There should be no more trace of MacPorts?

Is there a way to do this?

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

From the manual, uninstalling MacPorts works as follows. You need to first uninstall all ports:

sudo port -fp uninstall --follow-dependents installed

Also, to remove remainders of MacPorts, you will need to delete the following files by this single command (copy and paste it to Terminal):

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

Warning: Don't run a sudo command—especially a rm -rf one—unless you know what it's doing, and enter each line individually if you're unsure (e.g. sudo rm -rf /Applications/DarwinPorts, then sudo rm -rf /Library/LaunchDaemons/org.macports.*).

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.