Windows OS

How to Uninstall Python From Windows


Python is an all-purpose, well-liked programming language. It is primarily used for creating and designing websites, software, WebAPIs, and task automation. Python is also utilized in the machine learning domain. Sometimes we need to use the latest Python version equipped with new features. For this purpose, it is required to uninstall the previous Python version from windows.

In this article, we will illustrate the techniques used to uninstall Python from Windows:

Method 1: Uninstall Python From Windows Using GUI

The GUI of Windows provides a user-friendly interface to install/uninstall applications easily. The following steps guide you to uninstall Python from windows using GUI.

Step 1: Open Control Panel
Type “Control Panel” in the “Startup” menu to open the control panel:

Step 2: Navigate Programs Settings
Navigate to the “Programs” option in the “Control Panel” Window, and click on “Uninstall a program”:

Step 3: Select Python Setup
Find and select the Python setup file from the list of installed software:

Step 4: Uninstall Python
Right-click on the selected file, and choose the “Uninstall” option to uninstall Python from Windows:

Upon doing so, the Python uninstallation will begin:

Now, you can see that we have successfully uninstalled Python from Windows:

Let’s have a look at how to uninstall Python from Windows using the Command line.

Method 2: Uninstall Python From Windows Using Command Line

To uninstall Python from Windows using the command line, follow the below-mentioned steps:

Step 1: Open Windows Command Prompt
Firstly, utilize the “Window+R” shortcut key to open up the Run box. Then, type “cmd” in the drop-down menu and hit the “OK” button:

Step 2: Verify Python Installation
Next, verify whether Python is installed on the system or not by checking out its version:

> python -V

Step 3: Find Python Location
Check out the location where Python is installed using the “where” command:

> where python

Step 4: Change the PWD
Utilize the “cd” command to change the present working directory to the location where the Python is installed. In our case, the command would be:

>cd C:\Users\anuma\AppData\Local\Programs\Python\Python310

Step 5: Uninstall Python
Now, uninstall the Python from Windows by deleting its execution file:

>del python.exe

Step 6: Verify Python Uninstallation
Verify the Python uninstallation by again checking out its version:

> python -V

The below-provided output indicates that the Python is removed from the system.

We have offered various methods to uninstall Python from Windows.

Conclusion

To uninstall Python from Windows, you can either use Window Graphical User Interface or Command line. In the first approach, open the Control Panel application and utilize the “Programs” setting to uninstall Python from Windows. In the Command line, open the directory where the Python is installed, and then utilize the “del python.exe” command to remove Python from the system. Here, you have learned python uninstallation from windows.

About the author

Rafia Zafar

I am graduated in computer science. I am a junior technical author here and passionate about Programming and learning new technologies. I have worked in JAVA, HTML 5, CSS3, Bootstrap, and PHP.