views:

68

answers:

3

I want to update my Python framework on Mac and delete the old versions but I am not sure if is safe to

rm -fr /Library/Frameworks/Python.framework/Versions/2.4 - 2.5 - 2.6 -3.0 etc.

Any suggestion?

+2  A: 

No, it's not safe. Generally, don't mess with the Python that comes with your OS, many system tools depends on having a specific version of Python.

Lie Ryan
Yes, you should not mess with Python files that are part of an OS distribution. But the paths referenced by the OP are *not* to the Pythons that come with OS X, rather they are ones installed by the python.org installer or other third-party installers.
Ned Deily
A: 

Don't! Once, I tried deleting Python2.4 in my ubuntu. Ubuntu crashed, had to format it. It was funny. :D

FRD
+1  A: 

Yes, it's safe.
The Mac's system python's are in /System/Library/....
.dmg's downloaded and installed from python.org are placed in /Library/....
Don't delete the /System ones, but the /Library ones are user installed, so they should be safe to delete.

ma3
I personally have done this-- I've installed python.org's .dmg's, then removed them and installed from source with `homebrew`.
ma3
To completely delete the old ones, you can also delete the corresponding folders installed by the python.org installers into `/Applications`, either `/Applications/MacPython 2.n` or `/Applications/Python m.n`. The final piece is to delete the corresponding symlinks in `/usr/local/bin` (*not* `/usr/bin`!)
Ned Deily
+1 Ned. Agreed. I forgot those steps, but I remember doing them.
ma3