Issue
If I want to keep my venv as clean as possible how can I clean up the stuff I don't need? Let me lay out an example...
Say I try a bunch of new modules...
pip install foo
pip install bar
pip install foobar
pip install foobarfoo
and these modules have some requirements of their own, etc. later I decide on which one I want to use, but then I have a huge list of stuff in my requirement.txt and I can't remember what I need and what I don't, what depends on what, etc.
How can I keep it clean and lean?
Solution
This answer may be just what you need.
You can install and use the pip-autoremove utility to remove a package plus unused dependencies.
# install pip-autoremove pip install pip-autoremove # remove "somepackage" plus its dependencies: pip-autoremove somepackage -y
Answered By - Brendan Abel Answer Checked By - Mary Flores (WPSolving Volunteer)