Last modified: Jun 21, 2025 By Alexander Williams
How to Uninstall HTTPX in Python
HTTPX is a popular HTTP client for Python. It is used for making requests to web servers. Sometimes, you may need to uninstall it. This guide will help you do that.
Why Uninstall HTTPX?
You might want to uninstall HTTPX for several reasons. Maybe you no longer need it. Or you want to install a different version. Whatever the reason, the process is simple.
Uninstalling HTTPX is similar to uninstalling other Python packages. If you need help with other packages, check our guide on How to Uninstall Requests in Python.
Check if HTTPX is Installed
Before uninstalling, check if HTTPX is installed. Use the pip show
command.
pip show httpx
Name: httpx
Version: 0.23.0
Summary: A next-generation HTTP client for Python.
If HTTPX is installed, you will see its details. If not, you will see a "not found" message.
Uninstall HTTPX Using Pip
The easiest way to uninstall HTTPX is with pip uninstall
. Run this command in your terminal.
pip uninstall httpx
Found existing installation: httpx 0.23.0
Uninstalling httpx-0.23.0:
Would remove:
/path/to/httpx
Proceed (Y/n)? Y
Successfully uninstalled httpx-0.23.0
Confirm the uninstall by typing Y. HTTPX will be removed from your system.
Verify HTTPX is Uninstalled
After uninstalling, verify HTTPX is gone. Use the pip show
command again.
pip show httpx
WARNING: Package(s) not found: httpx
This confirms HTTPX is no longer installed. If you see this message, you are done.
Uninstall HTTPX in a Virtual Environment
If you use a virtual environment, activate it first. Then run the uninstall command.
source venv/bin/activate # For Linux/Mac
pip uninstall httpx
This ensures you only remove HTTPX from the virtual environment. Your global Python remains unchanged.
Common Issues and Fixes
Sometimes, uninstalling HTTPX may fail. Here are some common issues and fixes.
Permission Denied: Use sudo
on Linux/Mac if needed.
sudo pip uninstall httpx
Multiple Versions: If multiple versions exist, specify the version.
pip uninstall httpx==0.23.0
For more help, see our guide on How to Uninstall Flask in Python.
Conclusion
Uninstalling HTTPX in Python is straightforward. Use pip uninstall httpx
and confirm the action. Always verify the uninstall was successful.
If you work with other libraries, check our guides like How to Uninstall Django in Python. Happy coding!