How to remove a virtualenv created by "pipenv run"

I know that question is a bit old but

In root of project where Pipfile is located you could run

pipenv --venv

which returns

  • Linux/OS X:
/Users/your_user_name/.local/share/virtualenvs/model-N-S4uBGU
  • Windows:
C:\Users\your_user_name\.virtualenvs\model-N-S4uBGU

and then remove this env by typing

  • Bash/Zsh:
rm -rf /Users/your_user_name/.local/share/virtualenvs/model-N-S4uBGU
  • Powershell:
Remove-Item -Recurse -Force 'C:\Users\your_user_name\.virtualenvs\model-N-S4uBGU'
  • Command Prompt
rmdir /s "C:\Users\your_user_name\.virtualenvs\model-N-S4uBGU"

You can run the pipenv command with the --rm option as in:

pipenv --rm

This will remove the virtualenv created for you under ~/.virtualenvs

See https://pipenv.kennethreitz.org/en/latest/cli/#cmdoption-pipenv-rm

Tags:

Pipenv