How to uninstall Python?

Today, We want to share with you uninstall python.In this post we will show you How to delete Python?, hear for How do I remove old python from Windows. we will give you demo and example for implement.In this post, we will learn about Uninstalling Xampp Linux Ubuntu Using Terminal Command with an example.

How to Uninstall Python on Windows, Mac and Linux?

Python is uninstalled differently in Windows and Mac as well as Linux.

Uninstall Python on Windows
Today, I’m going to show you: How to completely remove/uninstall Python from Your Windows PC. To Uninstalling Python from Windows, follow these steps:

First, we have to search for Control Panel.
Type Control… And here we go, find Programs And Features, press “p”.

I have Python 3 (32bit and 64bit) Right click on version (program) that you want to Uninstalling.

And select uninstall (Uninstall/Change) “Uninstall” again Uninstall was successful! Okay,

now let’s test it, If Python completely remove from our (my) Windows PC or not.
Type “python”. Okay, ‘python’ is not recognized , so it means that we’ve completely it (Python) removed from our Windows PC.

you can delete it manually.

  1. step 1: open Command Prompt
  2. step 2: cd C:\Users\<you name>\AppData\Local\Microsoft\WindowsApps
  3. step 3: del python.exe
  4. step 4: del python3.exe

Removing additional files from the Terminal?

$ (base) Username:~ cd Library
sudo rm -rf Python

//root user directory and perform the following commands:
sudo rm -rf “/Applications/Python”
sudo rm -rf /Library/Frameworks/Python.framework
sudo rm -rf /usr/local/bin/python

Uninstall Python on Linux (Ubuntu)

# Remove python2
sudo apt purge -y python2.7-minimal
 
# You already have Python3 but 
# don't care about the version 
sudo ln -s /usr/bin/python3 /usr/bin/python
 
# Same for pip
sudo apt install -y python3-pip
sudo ln -s /usr/bin/pip3 /usr/bin/pip
 
# Confirm the new version of Python: 3
python --version

Uninstall Python on Mac

For Python 3 and above, first, perform the following steps:

  1. Go to the Finder.

  2. Click on Applications in the menu on the left.

  3. Find the Python folder with the version number you want to uninstall, right-click it, and select “Move to Trash”.

//Step 1
sudo rm -rf /Library/Frameworks/Python.framework/Versions/2.7

//Step 2
sudo rm -rf "/Applications/Python 2.7"

//Step 3
ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7' 

//Step 4
cd /usr/local/bin/
ls -l /usr/local/bin | grep '../Library/Frameworks/Python.framework/Versions/2.7' | awk '{print $9}' | tr -d @ | xargs rm

//Step 5
/Library/Frameworks/Python.framework/Versions/2.7 to your PATH environment file. Depending on which shell you use, any of the following files may have been modified: ~/.bash_login, ~/.bash_profile, ~/.cshrc, ~/.profile, ~/.tcshrc, and/or ~/.zprofile.

I hope you get an idea about All about Uninstalling python.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment