Two years ago, I used Macports to install a copy of Docker Machine onto a computer running OS X 10.9 "Mavericks". All I had to do was type sudo port install Docker-machine, and Macports automatically pulled down and compiled everything I needed.

As of August 2020, this doesn't work on Mavericks due to a bug in the latest versions of Go and/or Macports's Legacy Support framework. Since Mavericks is very old, this breakage is understandable. However, Docker Machine did work as of two years ago, and I wouldn't mind using an older version.

Using a clean Macports prefix, how can I install ports using only software that existed as of a certain date in the past? I do not want to merely install an older version of Docker Machine; I want to install an older version of Docker Machine and every port that Docker Machine depends on, such as Go and Legacy Support.

On Debian, this would be super easy; I'd just edit sources.list to point to a snapshot. How can I do something similar in Macports? The full Macports project history is tracked in Git, so I'm pretty sure it's possible.

† I'm delighted that Macports supports Mavericks at all. With Homebrew I would be completely SOL.

‡ Because I tried that, and it doesn't work. Which isn't particularly surprising given how ports and their dependencies are interconnected. For reference, the procedure for installing an older version of a single package is documented here.

  • "With Homebrew I would be completely SOL" - It's tedious to do, but you can use an older version of brew but manually edit the formulae to pull the latest versions of software. For popular formulae that don't require mac specific patches this usually works. For less popular things you can look at the macports file and see what patches are needed.
    – 1110101001
    Commented Aug 31, 2020 at 9:25

1 Answer 1


Thank you to Lothar Haeger on the Macports mailing list for giving me the key hint I needed. What I had to do was:

  1. Checkout a local copy of the Macports Port Tree from Github. cd ~; git clone https://github.com/macports/macports-ports

  2. Reset my local port tree to an earlier point in time. cd macports-ports; git reset --hard commit-hash-from-2018

  3. Generate a port index for my local port tree: portindex

  4. Tell Macports to use my local port tree in place of the official online one. To do this, I opened macports's sources.conf (generally in /opt/local/etc/macports/) in a text editor, commented out the default URL at the bottom of the file, and added after it: file:///Users/my-user-name/macports-ports [default]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .