Macports is trickier than it should be

macports, formerly Darwinports, looked to be a good, easy way to install and maintain a bunch of unix-based libraries and applications. After using it for a while, I see it has either design flaw or a documentation flaw. My use case is simple: I want my macports system to have installed and active only the latest version of each package. The older versions can be deleted. I don’t mind if dependencies need to be rebuilt during a package upgrade to satisfy this condition.

However, the port command seems to be broken because it doesn’t want you to uninstall a port for which another version is installed and active if any other ports depend on that port, even if the dependent ports were built against the installed, active port for which you’re trying to remove the inactives. Ugh!

This entry was posted in Uncategorized and tagged . Bookmark the permalink.

One Response to Macports is trickier than it should be

  1. frank says:

    Okay, after a bit more reading and then realizing the worst thing that could happen is I’d have to wipe out /opt/local and install and compile everything from scratch, I’ve got a one-line script that will remove old, inactive versions of installed ports: port installed | grep -v \(active\) | tail +2 | awk ' { print "uninstall -f ", $1, $2 } ' | sudo port -F . Using grep to limit the results is less dangerous than trying to get port to just give you the inactive ports — sometimes it’ll print out all the ports and I’m not sure why.

    Use at your own risk. If you know a better way please share it with me.

Comments are closed.