How to uninstall Python on macOS (2024)

Quick Links

  • Why is Python here?

  • Should you remove Python from your Mac?

  • How to uninstall Python on macOS using Terminal

  • How to uninstall Python on macOS using an uninstaller

  • How to uninstall Python on macOS manually

Many users opt to delete files, folders, and uninstall apps they're not using on their Macs to clear storage and simplify lists. Usually, removing these items is simple and requires just a click or two, but sometimes the process is more complex. One popular example is Python, which certain developers install on macOS to run relevant scripts. But, what if you're done with Python and want to remove it from your Mac? Yes, you can fully uninstall it, though we really recommend that you don't. It doesn't cost you anything to have it, but if you really want to get rid of it, we'll run through all of the exact steps in this guide.

Related

How to add Python to PATH in macOS

Save time by streamlining your Python development setup in macOS.

1

Why is Python here?

How to uninstall Python on macOS (2)

Python is a popular cross-platform programming language that's supported on macOS. While previous Mac operating systems shipped with Python installed by default, you may need to manually install Python on your Mac if you've purchased a newer model. Some more recent versions package what's known as a "stub" for Python, which is essentially a placeholder.

When you execute this Python placeholder file (typically by just typing "python" or "python3" in the terminal), it triggers a full installation of Python, which lets you use Pip on macOS and run Python scripts that can help with your daily workflows. Additionally, some development platforms require Python installation to function correctly.

Should you remove Python from your Mac?

How to uninstall Python on macOS (3)

Let's assume you were actively relying on Python but have now stopped doing so. Should you uninstall Python? The short answer is no. Uninstalling Python may not always be safe, and doing so might require you to reinstall macOS, as parts of the operating system rely on the stub and can break without it.

Furthermore, leaving Python installed has no downside at all. Python files generally occupy no more than 100MB, and they don't include an app icon that clutters the Launcher's page. So, even if you leave Python installed, it shouldn't be in your way. Nevertheless, if you decide to uninstall Python on macOS, you can follow the steps below at your own risk.

How to uninstall Python on macOS using Terminal

While we advise you not to uninstall Python, you can do so by following these steps on your Mac:

  1. Launch the Terminal app.
  2. Enter which python3 and hit the return button.
  3. Make a note of your Python version number (displayed after /Versions), as well as the entire address displayed in the Terminal, since you will replace the [version number] and [address above] with the actual number and address in the following command, as well as remove "/bin/python3" from the command line.
    How to uninstall Python on macOS (4)
  4. Enter sudo rm -rf [address above] and hit return. For this example, the command is sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.9.6. Again, do not include "/bin/python3".
    How to uninstall Python on macOS (5)

Python and all its relevant files should now be wiped from your Mac without causing irreversible damage to macOS. This should return your Mac to its stock configuration in relation to Python, complete with stub. However, any attempt to invoke the python3 command will prompt the user to install Python again, which you can install as part of Xcode.

How to uninstall Python on macOS using an uninstaller

If you want a turnkey solution to your Python predicament, third-party uninstallers can help. Many programs that uninstall Mac apps can also uninstall Python. Usually, all you have to do is follow the onscreen instructions. Here's a basic rundown of the steps you will have to take if you go this route:

  1. Launch your uninstaller of choice.
  2. Select Python. Depending on the uninstaller you use, you might also have to select all of its related files in a separate panel or dropdown menu.
  3. Click the Uninstall or Remove button, whichever is applicable.

Depending on the program you use, the uninstaller might remove all Python files from your computer or just move them to your Trash. If the latter is true, you will have to empty your computer's Trash folder to truly rid your Mac of Python. This also may not retain the stub.

How to uninstall Python on macOS manually

You can also uninstall Python the old-fashioned way and just remove the relevant files by hand. However, you have to remain vigilant throughout this process since one mistake can cause some serious problems.

  1. Quit Python and make sure none of its processes are running in the background. You might need to use the Activity Monitor to do this.
  2. Open Finder, then open the Application folder.
  3. Place Python in your computer's Trash.
  4. Do the same with all Python services in your Library folder. These can have names such as /Library/Frameworks/Python.framework and /Library/Saved Application State/org.python.IDLE.savedState.
  5. Repeat the process yet again for all Python-centric hidden files in your Users folder.
    • Before you start, make sure all hidden files are visible.
    • When deleting files, look for labels like /private/var/db/receipts/org.python.Python.PythonUnixTools-3.6.bom and /private/var/db/receipts/org.python.Python.PythonFramework-3.6.plist.

So long as you delete every instance of a Python-related folder and file, your Mac shouldn't encounter any issues after you're finished.

You shouldn't uninstall Python

As indicated in our guide, while it's possible to uninstall Python on macOS, you're not advised to do so. Leaving Python installed will not affect your workflow in any way. Moreover, we must stress that removing Python might break the operating system and require you to reinstall a fresh copy. So, while you can uninstall the coding language, whether or not you should is a completely different matter. In our opinion, it's better to just leave Python alone.

How to uninstall Python on macOS (2024)

References

Top Articles
Latest Posts
Recommended Articles
Article information

Author: Aracelis Kilback

Last Updated:

Views: 5873

Rating: 4.3 / 5 (44 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Aracelis Kilback

Birthday: 1994-11-22

Address: Apt. 895 30151 Green Plain, Lake Mariela, RI 98141

Phone: +5992291857476

Job: Legal Officer

Hobby: LARPing, role-playing games, Slacklining, Reading, Inline skating, Brazilian jiu-jitsu, Dance

Introduction: My name is Aracelis Kilback, I am a nice, gentle, agreeable, joyous, attractive, combative, gifted person who loves writing and wants to share my knowledge and understanding with you.