How to Uninstall a Package in Python using PIP

In this short tutorial, you’ll see how to uninstall a package in Python using PIP.

If you’re using Windows, you’ll be able to uninstall a Python package by opening the Windows Command Prompt, and then typing this command:

pip uninstall package_name

Note: the above method would only work if you already added Python to Windows path. Otherwise, check the steps below to uninstall a package.

Steps to Uninstall a Package in Python using PIP

(1) First, type Command Prompt in the Windows Search Box

(2) Next, open the Command Prompt, and you’ll see the following screen with your user name (to avoid any permission issues, you may consider to run the Command Prompt as an administrator):


(3) In the Command Prompt, type “cd\” as this command will ensure that your starting point has only the drive name:


(4) Press Enter. Now you’ll see the drive name C:\>


(5) Locate your Python Scripts path. The Scripts folder can be found within the Python application folder, where you originally installed Python.

Here is an example of a Python Scripts path:


(6) In the Command Prompt, type cd followed by your Python Scripts path:

C:\>cd C:\Users\Ron\AppData\Local\Programs\Python\Python39\Scripts

(7) Press Enter, and you’ll see the following:


(8) Finally, to uninstall a package in Python, use this command, while specifying the package name that you’d like to uninstall:

pip uninstall package_name

(9) To proceed with the removal of the package, type “y” and then press Enter:

Proceed (y/n)? y

Your Python package will now be removed from Python.

What if you changed your mind, and decided to install that package again?

If that’s the case, you may use the PIP install method to add the package into Python.