October 10, 2025

How to uninstall Python from Mac: A complete guide

Maksym Sushchuk
Written by
Experienced tech writer with 15 years of translating complex Mac concepts into clear, user-friendly content.

Maksym Sushchuk

Alex Holovchenko
Approved by
The content has been reviewed and approved by our team member, an Apple Certified Support Professional, who provides technical support to Nektony’s users.

Alex Holovchenko

Share

At some point, I ended up with more than one version of Python on my Mac. Nothing dramatic, but it did cause a few small conflicts that made me wonder if I should just clean it all out. If you’ve ever been in the same boat or if you simply want to free your Mac from Python and all its traces, this guide will help.

Below, I’ll walk you through several safe ways to uninstall Python so you can pick the one that best fits your setup and needs.

Two-click removal of Python IDLE

If your goal is to remove Python IDLE (the app bundle from the official installer), the quickest option is App Cleaner & Uninstaller by Nektony. It detects Python IDLE in the Applications folder, shows you all related files, and lets you remove them safely in just a couple of clicks.

Things to know before removing Python

Before you start, let’s clear up a few important details so you don’t accidentally remove something your Mac actually needs.

First things first, there’s Python and there’s Python IDLE.

  • Python is a programming language and runtime environment.
  • Python IDLE is a lightweight app for writing and running Python code installed when you download Python from the official website.
the graphic user interface of Python IDLE

In this article, I cover how to remove both.

Why do people remove Python?

Here are the most common scenarios where uninstalling Python makes sense:

  • Cleaning up the system. Python often comes bundled with Homebrew packages, Xcode Command Line Tools, or other apps you might no longer use.
  • Reinstallation or upgrade. Developers uninstall older versions when switching from, say, Python 3.11 to 3.13, to avoid clutter.
  • Resolving version conflicts. If you have multiple Python versions installed, they can conflict with each other or cause confusion (as in this case of a Reddit user).
  • Freeing up space. A full Python setup with modules and pip dependencies can take up hundreds of MBs.

And when it comes to Python IDLE, it often gets removed because it’s too limited for real projects, as it has no virtual environments, Git support, or advanced features. In such cases, users switch to more powerful editors like VS Code, PyCharm, Sublime Text, or beginner-friendly alternatives like Thonny.

A word of caution about macOS versions

  • On macOS 12 Monterey and earlier, the system comes with Python 2.7 preinstalled. Do not remove it. It’s tied to macOS itself, and deleting it may break scripts, apps, or even the OS, as highlighted in this Stackoverflow discussion.
  • Starting from macOS 13 Ventura, Apple no longer ships Python by default. However:

    • Installing Command Line Tools for Xcode adds Python 3.
    • Some apps (Docker, Blender, etc.) also bundle Python. Deleting those versions of Python can cause those apps to malfunction.
    • If Command Line Tools are causing trouble, the safe path is to uninstall the Tools completely, then reinstall them rather than ripping out Python alone.
  • All the methods described below were successfully tested on macOS 15.

How you might have installed Python

On modern Macs, Python usually arrives in one of three ways:

  • From the official Python website (along with IDLE).
  • Via Homebrew, pyenv, or MacPorts.
  • As part of Command Line Tools for Xcode or another app.

In the next section, we’ll help you check which installation method you used, as that determines how you should safely uninstall Python.

How to check how Python was installed on your Mac

Before removing Python, it’s important to confirm if Python is installed at all, which versions you have, and how they got there. This will determine the correct (and safe) way to uninstall it.

Step 1. Confirm installed versions in Terminal

  1. Open Terminal.
  2. Type the following command and press Return:
    python3 –version

    Copy

    The Terminal window showing the existing Python version

If you think Python 2 may still be present (on older macOS), use this command:

python2 –version

Copy

This shows which version(s) of Python are currently available on your Mac.

Later, once you uninstall Python, you can run the same command again to confirm that the version is no longer listed.

Step 2. Look for Python IDLE in Applications

  1. Open Finder → go to the Applications folder.
  2. Search for Python.
The Terminal window showing the existing Python version

If you see the Python folder, Python Launcher or IDLE, then Python was installed from the official Python.org package. You’ll need the removal steps for that version.

If nothing is found, move on.

Step 3. Check for Homebrew installation

In Terminal, run the following command:

brew list | grep python

Copy

the Terminal window showing the version of Python installed via Homebrew

If you see something like python@3.13, then Python came from Homebrew. If not, continue.

Step 4. Check for pyenv Installation

Run the command:

pyenv versions

Copy

the Terminal window showing the version of Python installed via pyenv

If you see a list of Python versions, they were installed via pyenv. If not, continue.

Step 5. Check for MacPorts Installation

Run the following:

port installed | grep python

Copy

If you see entries like python37, then Python was installed using MacPorts. If nothing shows, continue.

Step 6. Other Cases

If none of the above applies, Python may have been:

  1. Built from source → you’ll need to locate and remove it manually.
  2. Bundled inside another app (e.g., Command Line Tools for Xcode, Docker, Blender). In this case, don’t delete Python directly, as it may break the parent app. Uninstall (and reinstall) the parent app instead.

How to uninstall Python installed via Homebrew

If you installed Python with Homebrew (macOS package manager), you can remove it safely using a few Terminal commands.

Step 1. Open Terminal

  • Go to Applications → Utilities → Terminal.

Step 2. Check installed packages

Run:

brew list

Copy

the list of packages installed via Homebrew

This will show all Homebrew packages installed on your Mac, including any Python versions. You might see multiple entries like python@3.11 and python@3.13.

Step 3. Identify the version to remove

Look for the Python version you want to uninstall (e.g., python@3.13).

Step 4. Uninstall the selected version

Type the following command, replacing 3.x with the actual version number:

brew uninstall python@3.x

Copy

The Homebrew's Python uninstallation process in Terminal

Step 5. Verify removal

Run again:

brew list

Copy

If Python is no longer listed, the uninstallation was successful.

How to uninstall Python installed via pyenv

If you used pyenv to manage Python versions on your Mac, here’s how to remove any version you no longer need.

Step 1. Open Terminal

Step 2. Get the list of installed versions by running this command:

pyenv versions

Copy

This will display all Python versions installed via pyenv. You might see multiple entries, such as 3.11.9 and 3.13.7.

Step 3. Identify the version to remove

Find the version you want to uninstall. For example, 3.13.0.

Step 4. Uninstall the selected version

Run the following command, replacing the version number with the one you want to remove:

pyenv uninstall 3.13.0

Copy

Press y and then Enter to confirm.

The pyenv's Python uninstallation process in Terminal

Step 5. Verify removal

To make sure the version is gone, run again:

pyenv versions

Copy

If the version no longer appears in the list, it was successfully uninstalled.

How to uninstall Python installed via MacPorts

If you installed Python using MacPorts, you can remove it with just a couple of Terminal commands.

Step 1. Open Terminal

Step 2. View the list of installed versions

For this, run:

port installed | grep python

Copy

This will display all Python versions installed through MacPorts. You might see entries like python37 and python_select.

Step 3. Identify the version to remove

Review the list and decide on the Python version you want to uninstall (e.g., python37). You might also uninstall all of them one by one.

Step 4. Uninstall the selected version

Run the following command, replacing the version number with the one you want to remove:

sudo port uninstall python37

Copy

Enter your password if prompted.

The Macports' Python uninstallation process in Terminal

Step 5. Verify removal

To confirm that the version was removed, list installed Python packages again:

port installed | grep python

Copy

If the version no longer appears, the uninstallation was successful.

How to uninstall Python IDLE on Mac via a script

If you installed Python from the official Python.org website, it comes with IDLE (a lightweight code editor). Removing it with a script is the fastest manual removal method since it does the same thing as finding and removing all related files via Finder, but handles everything in one go.

Note:

This process deletes files permanently. Before proceeding with the following instructions, make sure you don’t have Python IDLE running.

Step 1. Download the script

Save the script file uninstall_python.sh to your Downloads folder.

Note:

You can open the script in any text editor to review how it works before running it and make sure it removes only Python IDLE-related files.

Step 2. Open Terminal

Step 3. Grant execution rights

Run the following command so that you could launch it:

chmod +x ~/Downloads/uninstall_python.sh

Copy

Allow the Terminal app to access the Downloads folder if prompted.

Step 4. Run the script with admin rights

Run this:

sudo ~/Downloads/uninstall_python.sh

Copy

Enter your administrator password when prompted.

The Terminal script uninstalling Python IDLE

After that, the script will automatically find your installed Python version and delete all related files.

Note:

If during the uninstallation you see “Operation not permitted”, that’s OK. It means some Python-related files are also used by other processes and hence should not be removed.

In the end, you’ll see a message like “Python 3.13 and related files have been removed.”

The script successfully uninstalled Python

Step 5. Remove a leftover file (if needed)

In some cases, one file named org.python.pythonlauncher.sfl3 may remain. To delete it:

  1. Open Finder.
  2. Press Shift + ⌘ + G to open the Go to folder dialogue.
  3. Paste this path and hit Return:

    ~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/org.python.pythonlauncher.sfl3

    Copy

  4. If the file org.python.pythonlauncher.sfl3 is present, remove it.
The Go to folder dialogue with the pasted path

Step 6. Empty Trash and restart

  1. Empty the Trash.
  2. Restart your Mac to complete the removal.

How to uninstall Python IDLE with App Cleaner & Uninstaller

Note:

App Cleaner & Uninstaller can only remove app bundles from the Applications folder. That means it works for Python IDLE (installed from the official Python.org package), but it won’t remove Python versions installed via Homebrew, pyenv, or MacPorts.

If your goal is to get rid of Python IDLE quickly, this is the easiest method:

  1. Download and launch App Cleaner & Uninstaller.
  2. Search for Python and select it.
  3. Once selected, simply click Uninstall. App Cleaner & Uninstaller with Python selected
  4. In the Review and confirm window, click Remove. The review and confirm window of App Cleaner & Uninstaller

App Cleaner & Uninstaller will remove Python IDLE and its associated service files in just a few clicks.

Final thoughts

As a bottom line, when it comes to Python as a programming language, here’s the simple rule of thumb:

  • The system Python lives in /usr/bin/ (for example, /usr/bin/python or /usr/bin/python2.7). These files are part of macOS and should never be deleted. the system's python3 file in /usr/bin
  • Your user-installed Python is usually located in a different folder, and you can manually remove it without harming your system. the user's python3 files installed via Homebrew

And if your goal is to remove Python IDLE, the simplest solution is to use App Cleaner & Uninstaller. It handles the app bundle and related files in just a couple of clicks.

This way, you can keep your Mac free from unused versions of Python while leaving the essential system components intact.

Frequently asked questions

How do I uninstall Python from Terminal?

That depends on how you installed it. If it was installed via Homebrew, pyenv, or MacPorts, use the dedicated commands shown in the sections above. For Python IDLE (from Python.org), you can run our uninstall script in Terminal or use App Cleaner & Uninstaller.

How to check if Python is installed on Mac?

Open Terminal and type:
python3 --version

Copy

If Python is installed, you’ll see the version number. You can also type python2 --version on older macOS releases. See how to check how Python was installed.

Where is Python on macOS?

  • System Python is in one of the following locations:
    /usr/bin/python

    Copy

    or
    /usr/bin/python2.7

    Copy

    (do not delete them).
  • User-installed Python is usually in
    /usr/local/bin/python3

    Copy

    .

What is the difference between Python and Python3?

On macOS, Python historically pointed to Python 2.7, while Python3 points to newer Python 3 versions. Since Python 2 is deprecated, most modern workflows use Python3.

Why do I have to run Python3 instead of Python?

Because on older macOS, Python still refers to Python 2.7. Apple never updated it to point to Python 3, so you must explicitly run python3.

Can I have both Python 3.9 and 3.10 installed?

Yes. Tools like pyenv and Homebrew allow multiple Python versions side by side. Just make sure you know which one is active by checking with
python3 --version

Copy

.

Is Python installed on Mac by default?

On macOS 12 Monterey and earlier, Python 2.7 comes preinstalled.

On macOS 13 Ventura and newer, Python is not preinstalled, but it can appear if you install Command Line Tools for Xcode or apps that bundle Python.

Is Python safe to download on Mac?

Yes, as long as you download it from Python.org, use Homebrew, or another trusted package manager.

Do I need to uninstall the version of Python that came with my Mac?

No, and you shouldn’t. The system Python in /usr/bin/ is part of macOS and is used by system processes. Removing it can break your Mac.

Is there an easy way to uninstall all Python versions at once?

Not really. Each version installed via Homebrew, pyenv, or MacPorts needs to be removed with its respective tool. If you installed Python multiple times manually, you’ll need to delete each copy individually.

Why am I still seeing Python or Python3 in my Terminal after uninstalling?

That usually happens if:

  • Another version is still installed via a different method.
  • A symbolic link remains in
    /usr/local/bin/

    Copy

    .
You can run
which python3

Copy

in Terminal to check the exact path that your shell is pointing to.

2 thoughts on “How to uninstall Python from Mac: A complete guide”

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top