How do I go about removing all these virtual environments? I don't know where the directories are
How do I remove pyenv virtualenvs
69.6k Views Asked by alois At
3
There are 3 best solutions below
0
On
Adding to Chris's answer, you might also need to delete the local .python-version:
$ pyenv uninstall 3.8.12/envs/test_venv
pyenv-virtualenv: remove /home/user1/.pyenv/versions/3.8.12/envs/test_venv? (y/N) y
$ python -V
pyenv: version 'test_venv' is not installed (set by /home/user1/.python-version)
$ rm .python-version
rm: remove regular file '.python-version'? y
$ python -V
Python 3.8.12

Assuming that list came from running
pyenv virtualenvs, you should be able to runto remove the
3.8.2/envs/greenhouseenvironment.The environments themselves should be subdirectories of whatever
pyenv rootreturns when you run it. Try doingcd $(pyenv root)and then looking in theversions/andversions/{version}/envs/subdirectories.See the documentation for more details.