HiveBrain v1.2.0
Get Started
← Back to all entries
snippetpythonCriticalCanonical

How do I remove/delete a virtualenv?

Submitted by: @import:stackoverflow-api··
0
Viewed 0 times
virtualenvhowremovedelete

Problem

I created an environment with the following command: virtualenv venv --distribute

Trying to remove it with the following command: rmvirtualenv venv does not work.

I do an lson my current directory and I still see venv

The only way I can remove it seems to be: sudo rm -rf venv

Note that the environment is not active. I'm running Ubuntu 11.10. Any ideas? I've tried rebooting my system to no avail.

Solution

"The only way I can remove it seems to be: sudo rm -rf venv"

That's it! There is no command for deleting your virtual environment. Simply deactivate it and rid your application of its artifacts by recursively removing it.

Note that this is the same regardless of what kind of virtual environment you are using. virtualenv, venv, Anaconda environment, pyenv, pipenv are all based the same principle here.

Context

Stack Overflow Q#11005457, score: 884

Revisions (0)

No revisions yet.