Diving into the world of Python programming is an exciting venture, allowing you to explore and create projects ranging from simple scripts to complex web apps. But sometimes, for a system cleanup or to install a different version, you may need to uninstall Python from your Windows PC completely.

Removing Python from your computer isn’t as straightforward as clicking “uninstall.” There are several steps to follow, and skipping even one can leave residual files on your system. Here’s how to completely uninstall Python from your Windows PC, leaving it clean and ready for whatever comes next.

Table of Contents

    Locate Your Python Installation

    The first step is to locate where Python is installed on your PC. You can find the installation path by typing where python in the Command Prompt.

    It’s normal to see Python installed in multiple locations, and it’s usually due to how different versions and distributions of Python are installed. Remember the file paths since you’ll need them in a bit.

    How to Uninstall Python

    To uninstall Python, start from the Settings app.

    1. Press Windows + I to open Settings.
    2. Select Apps from the left-hand pane, and then click Installed Apps.
    1. Scroll down until you find the Python app. Click the three dots next to it and select Uninstall from the context menu.
    1. Confirm that you want to uninstall Python by clicking Uninstall again.

    The uninstallation will begin and doesn’t take too long to complete. If necessary, repeat these steps for any other Python apps, such as the Python Launcher.

    After you uninstall Python, head back to the Command Prompt and run the where python command again. If a file path containing Python is returned, it’s not completely uninstalled.

    In our case, there’s something left over in the AppData\Local\Microsoft\WindowsApps file path. This is because the Python installer on Windows sets up the Python executable in this path when you select the “Add Python to PATH” option during installation.

    In File Explorer, we have two files: python.exe and python3.exe.

    Let’s delete them.

    1. Open Command Prompt and use the cd command to navigate to the directory with the two Python files. In this example, that would be: cd AppData\Local\Microsoft\WindowsApps
    1. Next, type del python.exe and press Enter.
    1. Now, type del python3.exe and press Enter.

    They are now successfully uninstalled. You can double-check that you’re in the clear by running where python again. If INFO: Could not find files for the given pattern(s) is returned, then Python is completely uninstalled from your PC.

    Delete Your Pip Packages

    When you uninstall Python using the standard uninstall process, it doesn’t automatically remove the pip packages you installed. These packages are stored in a separate directory that doesn’t get deleted during uninstallation.

    You can delete the pip packages by opening File Explorer and navigating to AppData\Local\Porgrams. You’ll see a folder named “Python.” Right-click this folder and click the trash can icon from the context menu to delete it.

    If you don’t delete this folder, you’ll have the same pip packages when reinstalling Python.

    A Fresh Slate

    Remember, it’s not just about the main Python uninstallation—don’t forget those Python and Python3 files that tend to stick around in your WindowsApps folder and the often-overlooked Pip packages nestled in their own directory. Ensuring these elements are also removed is crucial for a complete uninstallation.

    And there you have it—a thorough Python purge. Now, your PC is ready for whatever comes next: a system cleanup, a fresh Python installation, or a brand-new programming language.