Does uninstalling a package with "pip" also remove the dependent packages?

Hossein picture Hossein · Oct 27, 2011 · Viewed 115.4k times · Source

When you use pip to install a package, all the required packages will also be installed with it (dependencies). Does uninstalling that package also remove the dependent packages?

Answer

bwv549 picture bwv549 · Dec 30, 2014

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