Register Login

How to uninstall Python from different platforms like Windows, MAC & Linux

Updated Jan 28, 2022

Every student or professional in the field of computer science knows about Python. According to a survey in 2020, more than 8 million python developers are there in the world. This article is about the steps to uninstall Python from a system.

Why Python?

Python is one of the most popular programming languages as it is easy to use, easy to install and uninstall. Guido Van Rossum created this programming language. He assumed the open-source model would be ideal for adoption and bolstering innovation.

  1. It is easy to install and uninstall.
  2. It concentrates on code readability. The language is well-structured, versatile, and easy to learn.
  3. Python enables you to take the best of various paradigms of programming. It also actively utilizes operative programming traits.
  4. There is a library for anything one could think of: web development to machine learning.

How to uninstall Python from different platforms

For Windows:

Steps to uninstall Python from a device:

  1. Open Control Panel.
  2. Then, go to all control panel items.
  3. Click on program and features then, a list of all the installed programs shall appear on the screen.
  4. Select Python from the list and right-click on it. Then click uninstall.
  5. A dialogue box shall appear on the screen asking for confirmation.
  6. Click yes.
  7. The process of uninstalling Python is complete.

Usually, the Python uninstaller removes itself from the path, including all the python files. One can also remove the additional python files manually. To do that, follow the below steps:

  1. Click on Windows 
  2. Type Environment Variables and hit enter.
  3. A pop-up window will appear. Select the environment variable on the bottom right.
  4. Under the system variable section, click on the path and select edit.
  5. Locate the bin folder of Python. Select that folder and click delete to remove it from the path.
  6. Python gets entirely removed from the system.

For MAC:

Steps to uninstall Python from a device:

  1. Open Finder, then click on Applications.
  2. Find the Python folder. Right-click on it.
  3. Click Move to Trash
  4. The process of uninstalling Python is complete.

Python comes pre-installed in MAC. Manually uninstalling Python from MAC may harm the system. But one can remove the third-party python framework by searching in the Finder or manually in the terminal.

For Linux:

Linux also comes with already pre-installed Python. Manually uninstalling Python can harm the Graphical Display Manager. But there is no harm or side effect in uninstalling the manually installed Python version.

Here is the set of commands to uninstall Python:

# 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

To sum up:

Python is one of the widespread and most used programming languages. Because of its popularity, it comes pre-installed with various OS like Mac and Linux, unlike Windows. In Windows OS, programmers have to manually install Python in their system. It is not advisable to uninstall Python in Mac or Linux because it might harm the Operating System or Graphical Display Manager.


×