What Is PIP?

Before introducing something on how to uninstall PIP packages, lets first see a general introduction to Python PIP.

PIP is a package manager in Python that is used to install and manage Python packages.

How to Fix PIP Is Not Recognized in Windows Command Prompt?

This tool allows you to install and manage Python applications and their dependencies.

Package management is very important, so PIP is pre-installed in most Python distributions.

PIP Uninstall Packagename

Using this command, you might remove the installed package one by one.

add Python to Windows path

This method only works when you have already added Python to the Windows path.

Go toAdvanced > Environment Variables.

UnderUser variables, clickNew, and editVariable nameandVariable value.

How to Open Command Prompt (CMD) in Windows 11? (7 Ways)

In terms ofVariable value, it should include the Python software path and Python Scripts path.

Then, right-select thePython shortcutand chooseOpen file location.

The app path can be seen likeC:\Users\cy\AppData\Local\Programs\Python\Python311.

PIP uninstall package

The Scripts path should beC:\Users\cy\AppData\Local\Programs\Python\Python311\Scripts.

This post gives you some solutions.

Next, see how to uninstall PIP.

Step 1: In Windows, open Command Prompt with admin rights.

How to open Command Prompt (CMD) in Windows 11?

Step 2: Typecd\into the CMD window and pressEnter.

Step 3: Typecdfollowed by the Python Scripts path and here is an example cd C:\Users\cy\AppData\Local\Programs\Python\Python311\Scripts.

Step 4: Execute this command pip uninstall package_name.

Replace the package name with the one you have installed like pandas.

See an examplepip uninstall pandas.

Step 5: Typeyto confirm the uninstallation when asked.

Now, your Python package is removed from your setup.

It can help you list all the installed packages via PIP and uninstall them without asking for confirmation.

The correct throw in of this command ispip uninstall -y -r <(pip freeze).

Run these commands:

pip freeze > requirements.txt

pip uninstall -r requirements.txtThis helps to uninstall packages one by one.

pip uninstall -r requirements.txt -yThis helps to delete all the packages at once.

In addition to pip freeze, it’s possible for you to also usexargsto uninstall all the PIP packages.

The command ispip freeze | xargs pip uninstall -y.

If you have packages installed via VCS (like GitLab, Github, Bitbucket, etc.

Final Words

How to uninstall Python package with PIP or how to uninstall PIP packages?

If you have any ideas, let us know in the comment part.