Upgrading MacPorts with port reinstallation
From blinkenwiki
- Install Xcode 8 and command-line tools. To install command-line tools:
# code-select —install
- Download and install the MacPorts installer for Sierra.
- Get a list of the installed ports
# port -qv installed > ports-2016.10.15.out
- Force a clean install (not necessary, according to the MacPorts migration page, but doing it anyway):
# sudo rm -rf /opt/localsudo rm -rf /Applications/MacPortsReinstall MacPorts packagesudo rm /Library/LaunchDaemons/org.macports.slapd.plist
- Reinstall ports
# chmod +x ./restore_ports.tclcurl -O https://svn.macports.org/repository/macports/contrib/restore_ports/restore_ports.tclsudo ./restore_ports.tcl ports-2016.10.15.out