TL;DR
- The right command depends on how Python was installed: for Homebrew,
brew uninstall python@3.xCopy
for pyenv,pyenv uninstall <version>Copy
for MacPorts, or a manual sweep for the python.org installer.sudo port uninstall python3XCopy
- Unsure which you have? Run and
which python3Copy
first:brew list | grep pythonCopy
points to Homebrew on Apple Silicon,/opt/homebrewCopy
to Homebrew on Intel or python.org, and/usr/localCopy
to pyenv.~/.pyenvCopy
- One firm rule: leave and
/usr/bin/pythonCopy
alone. That is macOS’s own Python, and removing it can break system tools even when it looks unused./usr/bin/python2.7Copy
- The python.org build is the messy one: it scatters files across ,
/Applications/Python 3.x/Copy
, and a Launch Services entry that all need clearing by hand./Library/Frameworks/Python.framework/Copy
- Prefer to skip the cleanup? App Cleaner & Uninstaller by Nektony removes the python.org install and its leftovers automatically.
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.
This Article Contains
Things to know before removing Python
Before you start, let’s clear up a few important details so you don’t accidentally remove a Python copy 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.
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 Reddit user’s case).
- 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 Stack Overflow 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. I re-tested the App Cleaner & Uninstaller method on macOS 27 Golden Gate.
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
- Open Terminal.
- Type the following command and press Return:
python3 –versionCopy
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
- Open Finder → go to the Applications folder.
- Search for Python.
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
If you see an entry like python@3.13, then Python came from Homebrew. If not, continue.
Step 4. Check for pyenv installation
Run the command:
pyenv versions
Copy
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:
- Built from source → you’ll need to locate and remove it manually.
- 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
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
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.
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.
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 nektony_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 can 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.
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.”
Step 5. Remove a leftover file (if needed)
In some cases, one file named org.python.pythonlauncher.sfl3 may remain. To delete it:
- Open Finder.
- Press Shift + ⌘ + G to open the Go to folder dialog.
Paste this path and hit Return:
~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/org.python.pythonlauncher.sfl3Copy
- If the file org.python.pythonlauncher.sfl3 is present, remove it.
Step 6. Empty Trash and restart
- Empty the Trash.
- Restart your Mac to complete the removal.
How to uninstall Python and IDLE with App Cleaner & Uninstaller
Note:
App Cleaner & Uninstaller removes Python installed from python.org, together with IDLE. For Python installed with Homebrew, pyenv, or MacPorts, use those tools as described in the sections above.
For a python.org installation of Python 3.13, App Cleaner & Uninstaller removes:
- The Python 3.13 folder in Applications, with IDLE and Python Launcher.
- The Python framework in .
/Library/Frameworks/Python.frameworkCopy
- The python3, pydoc3, and idle3 links in .
/usr/local/binCopy
- The package receipts in .
/private/var/db/receiptsCopy
On my Mac, that came to about 650 MB in roughly 13,900 items.
If you installed Python from python.org, this is the easiest method:
- Download and launch App Cleaner & Uninstaller.
- Search for Python. The python.org installation appears as a folder named after its version, for example Python 3.13.
- Select Python 3.13. The right panel shows its size, the number of items, and the developer, Python Software Foundation.
- Click Uninstall.
- In the Review and confirm removal of selected items window, check the list and click Remove.
App Cleaner & Uninstaller moves the removed files to the Trash, so you can restore them until you empty it.
To see every file before removal, turn on Expert Mode at the top of the right panel and tick Python 3.13. The panel lists IDLE, the command-line links, and the package receipts. The button then reads Remove and opens the same review window.
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.
- Your user-installed Python is usually located in a different folder, and you can manually remove it without harming your system.
And if you installed Python from python.org, the simplest solution is App Cleaner & Uninstaller. It removes IDLE, the Python framework, the command-line links, and the package receipts in 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 from python.org, including IDLE, you can run our uninstall script in Terminal or use App Cleaner & Uninstaller.
How to check if Python is installed on Mac?
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: or
/usr/bin/pythonCopy
(do not delete them)./usr/bin/python2.7Copy
- User-installed Python is usually in .
/usr/local/bin/python3Copy
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?
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
which python3
Copy



