Last modified: Jun 21, 2025 By Alexander Williams
How to Uninstall Scrapy in Python
Scrapy is a popular Python framework for web scraping. Sometimes, you may need to uninstall it. This guide will help you remove Scrapy cleanly.
Why Uninstall Scrapy?
You might want to uninstall Scrapy for various reasons. Maybe you no longer need it or want to reinstall a fresh version. Whatever the reason, the process is simple.
Check If Scrapy Is Installed
Before uninstalling, check if Scrapy is installed. Use the pip show
command.
pip show scrapy
If Scrapy is installed, you will see details like version and location. If not, you'll get a "not found" message.
Uninstall Scrapy Using Pip
The easiest way to uninstall Scrapy is with pip uninstall
.
pip uninstall scrapy
Confirm the uninstallation by typing y when prompted. This removes Scrapy from your Python environment.
Remove Scrapy Dependencies
Scrapy has dependencies. To remove them, use the --autoremove
flag.
pip uninstall scrapy --autoremove
This ensures all unused dependencies are also removed. It keeps your environment clean.
Verify Uninstallation
After uninstalling, verify Scrapy is gone. Run the pip show
command again.
pip show scrapy
If Scrapy is uninstalled, you'll see a "not found" message. This confirms successful removal.
Manual Removal (Optional)
Sometimes, files remain after uninstallation. Check these directories and remove Scrapy manually.
# On Linux/Mac
rm -rf ~/.local/lib/python*/site-packages/scrapy
# On Windows
rmdir /s /q "%USERPROFILE%\AppData\Local\Programs\Python\Python*\Lib\site-packages\scrapy"
Be careful with manual removal. Deleting wrong files can break other packages.
Reinstall Scrapy (If Needed)
If you uninstalled Scrapy by mistake, reinstall it easily.
pip install scrapy
This will install the latest version of Scrapy. You can also specify a version.
Common Issues
Sometimes, uninstallation fails. Here are fixes for common issues.
Permission Denied: Run the command with sudo
on Linux/Mac.
sudo pip uninstall scrapy
Multiple Python Versions: Ensure you're using the correct pip. Specify the Python version.
python3.9 -m pip uninstall scrapy
Virtual Environments: Activate the virtual environment before uninstalling.
source venv/bin/activate # Linux/Mac
pip uninstall scrapy
Conclusion
Uninstalling Scrapy is straightforward. Use pip uninstall
and remove leftovers manually if needed. Always verify the uninstallation.
For other packages, check our guides on How to Uninstall Selenium in Python or How to Uninstall BeautifulSoup (bs4) in Python.
Keep your Python environment clean for better performance. Happy coding!