Last modified: Jun 23, 2025 By Alexander Williams

How to Uninstall PyPDF in Python

PyPDF is a Python library for working with PDF files. Sometimes, you may need to uninstall it. This guide will show you how.

Why Uninstall PyPDF?

You might want to uninstall PyPDF for several reasons. Maybe you no longer need it. Or you want to install a different version.

Another reason could be to free up space. Or to resolve conflicts with other libraries.

Check If PyPDF Is Installed

Before uninstalling, check if PyPDF is installed. Use the pip list command.

 
pip list


Package    Version
---------- -------
PyPDF      1.0.0

If PyPDF appears in the list, it is installed. If not, you don't need to uninstall it.

Uninstall PyPDF Using Pip

The easiest way to uninstall PyPDF is with pip uninstall. Run the following command.

 
pip uninstall PyPDF

You will see a confirmation prompt. Type y and press Enter.


Uninstalling PyPDF-1.0.0:
  Would remove ...
Proceed (y/n)? y
  Successfully uninstalled PyPDF-1.0.0

PyPDF is now uninstalled. You can verify this by running pip list again.

Uninstall PyPDF in a Virtual Environment

If you are using a virtual environment, activate it first. Then run the uninstall command.

 
source venv/bin/activate  # Linux/MacOS
venv\Scripts\activate    # Windows
pip uninstall PyPDF

This ensures PyPDF is removed only from the virtual environment.

Force Uninstall PyPDF

Sometimes, PyPDF may not uninstall properly. Use the --force flag to force uninstall.

 
pip uninstall PyPDF --force

This removes PyPDF even if there are errors.

Reinstall PyPDF If Needed

If you need PyPDF again, you can reinstall it. Use the pip install command.

 
pip install PyPDF

This will install the latest version of PyPDF.

Common Issues and Fixes

You may encounter issues when uninstalling PyPDF. Here are some common ones and their fixes.

Permission Denied Error

If you get a permission error, use sudo on Linux/MacOS.

 
sudo pip uninstall PyPDF

On Windows, run the command prompt as administrator.

PyPDF Not Found

If PyPDF is not found, check the exact package name. Use pip list to confirm.

Conclusion

Uninstalling PyPDF in Python is simple. Use pip uninstall PyPDF and confirm. For more details, check our guide on How to Uninstall PyPDF2 in Python.

If you need to uninstall other libraries, see our guides on How to Uninstall Xlrd in Python or How to Uninstall Openpyxl in Python.

Always verify the uninstallation with pip list. This ensures the package is removed.