Safe way to uninstall old version of python

37,311

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.

Share:
37,311
fabrizioM
Author by

fabrizioM

I am an artist

Updated on July 09, 2022

Comments

  • fabrizioM
    fabrizioM almost 2 years

    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?

  • snapshoe
    snapshoe over 13 years
    I personally have done this-- I've installed python.org's .dmg's, then removed them and installed from source with homebrew.
  • Ned Deily
    Ned Deily over 13 years
    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
    Ned Deily over 13 years
    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.
  • snapshoe
    snapshoe over 13 years
    +1 Ned. Agreed. I forgot those steps, but I remember doing them.
  • mel
    mel over 8 years
    It's safer not to mess with /System/Library/Frameworks/Python.framework/
  • skywalker
    skywalker over 8 years
    /Library/Frameworks/Python.framework is not the system one
  • jonnyd42
    jonnyd42 over 6 years
    I'm not able to do the above command. I get "Operation not permitted" even when I use sudo. @snapshoe