Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does pyenv uninstall remove all packages installed via pip?

I want to remove some older versions and I'm wondering do I have to remove all of the packages installed via pip first, then do a pyenv uninstall [version]?

like image 232
adamstueckrath Avatar asked Apr 30 '18 19:04

adamstueckrath


People also ask

Does uninstalling pip remove packages?

Your answer pip install --user somepackage installs to $HOME/. local, and uninstalling it does work using pip uninstall somepackage. This is true whether or not somepackage is also installed system-wide at the same time. If the package is installed at both places, only the local one will be uninstalled.

Does uninstalling Python remove all packages?

@patelshahrukh uninstalling python DOES NOT remove pip packages. please AVOID doing that, since it both most likely WON'T WORK the way you think it will, and, depending on how you install python again, can leave your machine in an unstable state that's more work to fix.

How do I delete all installed pip packages?

You can use pip uninstall -y -r <(pip freeze) to do everything in one go.


1 Answers

In essence pyenv uninstall removes the entire directory with a python version. So yes, I'm sure it removes installed packages as they are in $PREFIX/lib/pythonX.Y/site-packages.

like image 121
phd Avatar answered Sep 28 '22 07:09

phd