pip uninstall
The pip command that removes an installed package, but not the dependencies that came with it.
In more detail
Leftover dependencies, orphans, accumulate over time. The clean way to tidy an environment is to delete it and rebuild it from requirements.txt.
Related terms
- pip — Python's standard package installer, which downloads packages from the Python Package Index and installs them.
- requirements file — A text file, usually requirements.txt, listing the packages a project needs, one per line, often pinned to exact versions.
- virtual environment — A self-contained folder with its own Python and its own installed packages, so each project's packages stay separate.
Taught in
- pip, requirements, and installing packages — Hands-on Python: Complete Video Course & Book