3

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 Answer 1

5

You can use -y for a dry run to see what will be uninstalled without actually performing the uninstallation:

port -y uninstall --follow-dependents python34 
Sign up to request clarification or add additional context in comments.

6 Comments

For me port -y uninstall --follow-dependents python34 lists exactly the packages I do want to uninstall: gist.github.com/cdeil/9e1f47270b71844a8f618ec17d9134d6 But as I said above, without the -y, port uninstall --follow-dependents python34 starts to uninstall other packages from Python 2.7, 3.5 and 3.6 as well. Do you see the same behaviour? Is it a bug in Macports?
No, I tried and it only uninstalled those listed as its dependents, nothing more. But I only have two versions. What other packages you observed that was also uninstalled?
This is what I got this time: gist.github.com/cdeil/dc6dd1029964542c6365c2fdde21e776 As you can see e.g. on line 130, py35-bokeh was uninstalled. Is this a bug? Shouldn't the list of packages with -y and then the ones that are actually uninstalled when you leave -y off be identical?
I can duplicate the issue now when I add more ports. Looks like it's a bug. I tried uninstalling individual port from the list obtained by "-y" option one by one before uninstalling python34, and it worked without triggering any other python versions.
Jack: thank! Since you can reproduce the behaviour I see and also think it might be a bug, I've filed an issue at trac.macports.org/ticket/54645
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.