Back up MacPorts files

1

I am planning to migrate from MacPorts to homebrew. Where are all the MacPorts files located (mostly what it installs) so I can back them up? (I do have a regular backup, of course)

Wuffers

Posted 2011-05-17T22:07:15.603

Reputation: 16 645

If you can change your vote, give @Chris Johnson the nod. I'd bet my quick-and-dirty answer of "/opt" is probably true for the majority of MacPorts installations out there, but it's true that there are some packages you can install via MacPorts that can put things outside of /opt, as Chris documented. – Spiff – 2011-05-18T06:37:35.140

Answers

3

The vast portion of a MacPorts installation is usually1 under /opt/local/, but there are some extra locations that often hold a few other files. See the Uninstall section of the MacPorts Guide.

Here are the highlights:

  • /Applications/MacPorts/
    I usually end up with some GUI applications that come with Python in here.
  • /Library/LaunchDaemons/org.macports.*
    Servers ports may drop a file here (e.g. org.macports.OpenSSH.plist).
  • /Library/Receipts/MacPorts*.pkg
    You will have one of these if you used the binary installer (most people probably do).
  • ~/.macports
    Might contain some history or settings for the port command.

1 If you installed from source or SVN, then your installation might be using a directory other than /opt/local/.

Chris Johnsen

Posted 2011-05-17T22:07:15.603

Reputation: 31 786

4

They're all under /opt.  

Spiff

Posted 2011-05-17T22:07:15.603

Reputation: 84 656