nitinkc
nitinkc

Reputation: 53

Errors upon uninstalling MacPorts on El Capitan

I have a mac which I purchased having Mavericks installed and now upgradedEl Capitan. I had installed MacPorts earlier and now I want to uninstall, but I am getting this error.

 > sudo port -fp uninstall installed

  Error: Current platform "darwin 15" does not match expected platform "darwin 13"

  Error: If you upgraded your OS, please follow the migration instructions: https://trac.macports.org/wiki/Migration OS platform mismatch while executing"mportinit ui_options global_options global_variations"

  Error: /opt/local/bin/port: Failed to initialize MacPorts, OS platform mismatch

The uninstallation instruction on the migration page of macports also leads to the same error. It would be great if anyone can explain the error.

Upvotes: 0

Views: 1070

Answers (2)

neverpanic
neverpanic

Reputation: 2998

Follow the first two steps of the Migration instructions at http://trac.macports.org/wiki/Migration, then proceed with the normal uninstallation:

  1. Install the latest version of Xcode and the Xcode command line tools

    After a major system change, update the development tools by ​installing the latest version of Xcode. Open the Xcode application once after installation and follow any prompts. Install the command line tools package as well.

  2. Reinstall MacPorts base

    After updating the development tools, install the base MacPorts system for your new platform, either from the appropriate installer or from source.

    [...]

Upvotes: 1

m7thon
m7thon

Reputation: 3043

MacPorts Guide Chapter 2.4. Uninstall:

To remove all remaining traces of MacPorts, run the following command in the 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

EDIT: Oh, to explain the error. Your previous MacPorts installation was for a previous version of OSX, corresponding to 'platform "darwin 13"', but you are now running a newer version of OSX corresponding to 'platform "darwin 15"'.

Upvotes: 1

Related Questions