Macports uninstall only one Python version

Viewed 3214

I have Macports and for historic reasons have multiple versions installed (2.7, 3.4, 3.5, 3.6). How can I uninstall python34 and all Python 3.4 packages?


That was my main question, here's some background info and things I've tried.

At first I did this:

$ sudo port uninstall python34
Password:
Note: It is not recommended to uninstall/deactivate a port that has dependents 
as it breaks the dependents.
The following ports will break:
 py34-six @1.10.0_0
 ... more packages here, all the ones starting with py34 that I want to remove ...
Continue? [y/N]: 

Then I tried this, which to my big surprise / horror started to uninstall also Python packages from Python 2.7, 3.5 and 3.6:

$ sudo port uninstall --follow-dependents python34

From port help uninstall I can see that there's an @version syntax and a --no-exec option.

But to be honest, from the description given it's not clear to me if / how @version applies to Python itself and Python packages in Macports (as far as I know python34 and python35 are separate ports, but py34-something and py35-something are different versions of the same port?

And --no-exec help says "Do not execute any stored pre- or post-uninstall procedures." What does this mean? Can I safely use it to list what will be uninstalled, or are there other phases or procedures during which it might or will uninstall something?

1 Answers
Related