find-venvs (vf)
Discover and manage all Python virtual environments on your system — regardless of name, tool, or location.
$ vf list
Found 7 virtual environment(s) under /home/abhishek
╭────┬──────────────────┬───────────────────────────────────────┬────────┬────────────────╮
│ Name │ Path │ Type │ Python Version │
├────┼──────────────────┼───────────────────────────────────────┼────────┼────────────────┤
│ .venv │ /home/abhishek/projects/api/.venv │ venv │ 3.11.4 │
│ groot │ /home/abhishek/projects/web/groot │ venv │ 3.10.12 │
│ base │ /home/abhishek/miniconda3/envs/base │ conda │ 3.9.7 │
╰────┴──────────────────┴───────────────────────────────────────┴────────┴────────────────╯
Why find-venvs?
Every tool that creates virtual environments (python -m venv, virtualenv, conda, poetry, pipenv) only knows about the environments it created. There is no existing pip-installable tool that answers the simple question:
"Where are all the virtual environments on my machine?"
find-venvs detects venvs by their content (pyvenv.cfg for standard venvs, conda-meta/ for conda), not by name — so it finds .venv, venv, env, groot, or any arbitrary directory name.
Installation
pip install find-venvs
Requires Python 3.8+. Works on Linux, macOS, and Windows.
Windows note: The
--systemflag is not supported on Windows (no single filesystem root). Use--root C:\or--root D:\to scan a specific drive.
Commands
vf list — list all environments
vf list # scan home directory
vf list --root /some/dir # scan a specific directory
vf list --system # scan from filesystem root /
vf list --depth 4 # limit recursion depth (default: 8)
vf list --json # machine-readable JSON output
JSON output example:
[
{
"name": ".venv",
"path": "/home/abhishek/projects/api/.venv",
"type": "venv",
"python_version": "3.11.4"
}
]
vf info <name> — inspect a single environment
Shows disk size, installed package count, and last-modified time.
vf info .venv
vf info myenv --root /projects
╭─────────────────── .venv ───────────────────╮
│ Name .venv │
│ Path /home/abhishek/projects/.venv │
│ Type venv │
│ Python 3.11.4 │
│ Disk size 142.3 MB │
│ Packages 34 │
│ Last modified 2024-11-20 14:32 │
╰──────────────────────────────────────────────╯
If multiple environments share the same name, vf info shows a numbered list and asks you to pick one.
vf clean — find orphaned environments
Lists environments whose parent directory has no project files (pyproject.toml, requirements.txt, .git, Makefile, etc.) — a strong signal the project was deleted and the venv is leftover.
vf clean
vf clean --root /projects
vf del <name> — delete an environment
vf del .venv # interactive confirmation
vf del .venv --yes # skip confirmation
vf del .venv --dry-run # show what would be deleted, do nothing
vf del .venv --path /projects/api # skip full scan, go directly to /projects/api/.venv
Flags:
| Flag | Short | Description |
|---|---|---|
--yes |
-y |
Skip the confirmation prompt |
--dry-run |
-n |
Preview deletion without removing anything |
--path DIR |
-p |
Parent directory of the venv — skips system scan |
When multiple environments share the same name and --path is not given, vf del shows a numbered picker so you choose exactly which one to remove.
Global scan flags
All subcommands accept these flags:
| Flag | Short | Default | Description |
|---|---|---|---|
--root DIR |
-r |
home directory | Root directory to scan |
--system |
off | Scan from filesystem root / |
|
--depth N |
-d |
8 | Maximum recursion depth |
Library API
You can use the scanner directly in your own scripts:
from find_venvs import scan, VenvInfo
from pathlib import Path
for venv in scan(Path.home(), max_depth=6):
print(venv.path, venv.venv_type, venv.python_version)
scan() yields VenvInfo dataclass instances:
@dataclass
class VenvInfo:
path: Path
venv_type: str # "venv" | "conda"
python_version: str | None
How detection works
| Signal | Detected as |
|---|---|
pyvenv.cfg present in directory |
venv (works for python -m venv, virtualenv, poetry, pipenv) |
conda-meta/ directory present |
conda |
Detection is purely content-based — the directory can have any name.
Directories known to never contain user venvs are skipped automatically: node_modules, .git, __pycache__, /proc, /sys, /dev, .cache, snap, and more. Symlinks are never followed.
License
MIT
Metadata
Release files for find-venvs 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| find_venvs-0.3.0.tar.gz | 12.0 kB | Without provenance | Details for find_venvs-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| find_venvs-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for find_venvs-0.3.0-py3-none-any.whl |
Total release size: 23.0 kB
Release files / find_venvs-0.3.0.tar.gz
| Download URL | find_venvs-0.3.0.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0854edae1315f647409284171e86a3bd216d41fb96f7508b6a1d6fc778de0475
|
|
BLAKE2b-256 checksum How to use checksums |
44af586378def60304f79fd95f2b37db0b04d0d5e36baed6642e7a635f13e32f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Release files / find_venvs-0.3.0-py3-none-any.whl
| Download URL | find_venvs-0.3.0-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02c185f02dd54c9dd4cc3f803e02b538acbf2f608a7b67ec7e8139beb57784e9
|
|
BLAKE2b-256 checksum How to use checksums |
840868f4e34b888cc65f0e6ca3f48ef2936afc11d15e071ca3197f69e7d781ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Security for find-venvs 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.