How to uninstall Python (2024)

Python is uninstalled differently in Windows, macOS, and Linux.

Windows

To uninstall Python from Windows, follow these steps:

  1. Navigate to the “Control Panel.”
  2. Click “Uninstall a program,” and a list of all the currently installed programs will be displayed.
  3. Select the Python version that you want to uninstall, then click the “Uninstall” button above the list. This has to be done for every Python version installed on the system.

MacOS

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

  1. Go to the “Finder.”
  2. Click “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 the “Move to Trash” option.

Depending on the process of installation, Python might or might not be present in the “Applications” folder. If it’s not, perform the steps in the next section.

Removing additional files from the “Terminal”

Moving the Python application to trash will not remove Python entirely. Furthermore, a built-in Python distribution might not appear in the “Applications” folder. So we’ll have to use the “Terminal” to uninstall it manually.

First, open the “Activity Monitor” and close all processes related to Python in the “Memory” tab. One such process is the “Python Launcher.” Now we can proceed to the “Terminal.”

  1. Open the “Terminal” and navigate to your Library folder from your root directory:
$ (base) Username:~ cd Library

Here, we can list the current folders in our Library using the ls command. Look for a folder named Python. Remove this folder with super-user privileges:

sudo rm -rf Python

Note: The operation requires your password in order to be completed.

Additionally, three more main directories have to be handled in order to remove Python. Move back to your root user directory and perform the following commands:

sudo rm -rf “/Applications/Python”sudo rm -rf /Library/Frameworks/Python.frameworksudo rm -rf /usr/local/bin/python

Note: We don’t recommend this step for novice macOS users. The way Python files are distributed in your Library and cache can differ based on your use, and so, extra files might have to be deleted, which you can search for in the “Finder” or manually in the “Terminal.”

How to uninstall Python (2024)
Top Articles
Latest Posts
Article information

Author: Mrs. Angelic Larkin

Last Updated:

Views: 5667

Rating: 4.7 / 5 (67 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Mrs. Angelic Larkin

Birthday: 1992-06-28

Address: Apt. 413 8275 Mueller Overpass, South Magnolia, IA 99527-6023

Phone: +6824704719725

Job: District Real-Estate Facilitator

Hobby: Letterboxing, Vacation, Poi, Homebrewing, Mountain biking, Slacklining, Cabaret

Introduction: My name is Mrs. Angelic Larkin, I am a cute, charming, funny, determined, inexpensive, joyous, cheerful person who loves writing and wants to share my knowledge and understanding with you.