How to uninstall Python 2.7 on a Mac OS X 10.6.4?
Do not attempt to remove any Apple-supplied system Python which are in /System/Library
and /usr/bin
, as this may break your whole operating system.
NOTE: The steps listed below do not affect the Apple-supplied Python 2.7; they only remove a third-party Python framework, like those installed by python.org installers.
The complete list is documented here. Basically, all you need to do is the following:
Remove the third-party Python 2.7 framework
sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7
Remove the Python 2.7 applications directory
sudo rm -rf "/Applications/Python 2.7"
Remove the symbolic links, in
/usr/local/bin
, that point to this Python version. See them usingls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7'
and then run the following command to remove all the links:
cd /usr/local/bin/
ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7' | awk '{print $9}' | tr -d @ | xargs rm
- If necessary, edit your shell profile file(s) to remove adding
/Library/Frameworks/Python.framework/Versions/2.7
to yourPATH
environment file. Depending on which shell you use, any of the following files may have been modified:~/.bash_login
,~/.bash_profile
,~/.cshrc
,~/.profile
,~/.tcshrc
,~/.zshrc
, and/or~/.zprofile
.
How to completely uninstall python 2.7.13 on Ubuntu 16.04
caution : It is not recommended to remove the default Python from Ubuntu, it may cause GDM(Graphical Display Manager, that provide graphical login capabilities) failed.
To completely uninstall Python2.x.x and everything depends on it. use this command:
sudo apt purge python2.x-minimal
As there are still a lot of packages that depend on Python2.x.x. So you should have a close look at the packages that apt wants to remove before you let it proceed.
Thanks, I hope it will be helpful for you.
Unable to uninstall Python 2.7.18 via CLI (msi file/windows)
Thanks to @Stein-Asmul I found a solution here: Uninstalling an MSI file from the command line without using msiexec
Instead of calling my msi file like python-2.7.18.msi /uninstall
- I am now calling msiexec.exe from Windows:msiexec.exe /x "D:\X\python-2.7.18.msi" /QN REBOOT=R
This in my case, works perfect
Related Topics
Do Not Want the Images to Load and CSS to Render on Firefox in Selenium Webdriver - Python
Sending a Password Over Ssh or Scp with Subprocess.Popen
Oserror 38 [Errno 38] with Multiprocessing
List Nearby/Discoverable Bluetooth Devices, Including Already Paired, in Python, on Linux
Pip Error:'Module' Object Has No Attribute 'Cryptography_Has_Ssl_St'
Can You Fool Isatty and Log Stdout and Stderr Separately
Pyaudio Installation Error - 'Command 'Gcc' Failed with Exit Status 1'
How to Get Hard Disk Serial Number Using Python
Equivalent to Gettickcount() on Linux
Default Buffer Size for a File on Linux
Getting Another Program's Output as Input on the Fly
Running Process of Remote Ssh Server in the Background Using Python Paramiko
Run a Python Script in Terminal Without the Python Command
Determine If Package Installed with Yum Python API
How to Make Pip Install to Path on Linux