If you want to remove some installed pip pacakge, most likely you also want to remove the pip packages it depends and installed with it. Unfortunately, “pip” itself doesn’t provide such option. However, you can still do this with some other useful pip packages, “pipdeptree“ and “pip-autoremove“.
pip install pip-autoremove
First you can run the following command to check the dependency tree of your current installed pip packages:
If you want to remove some pip package and the ones it depends, you can run:
pip-autoremove ndfilter -y