Everywhere All articles Download Buy — $19

Where apps hide your files

Finding pyenv's Python versions

Updated 2026-10-28 · 6 min read

Every Python you install with pyenv gets its own folder inside a hidden ~/.pyenv directory in your home folder. A few commands will print the exact path on your Mac, so you can see what takes the space and remove what you no longer need.

Where the versions are

~/.pyenv/versions/

Each Python you install gets its own folder there, named after the version, for example ~/.pyenv/versions/3.12.4. That is the default from pyenv's own README: each version "is installed into its own directory under $(pyenv root)/versions", and the root defaults to ~/.pyenv.

To print the real path on your Mac, including when PYENV_ROOT has been changed:

pyenv root
pyenv versions
pyenv prefix 3.12.4

pyenv versions lists what is installed, and pyenv prefix <version> prints one version's folder (swap in a version from your list). The ~/.pyenv folder starts with a dot, so Finder hides it. Choose Go > Go to Folder (⇧⌘G), paste ~/.pyenv/versions and press Return, or run:

open ~/.pyenv/versions

Homebrew installs pyenv, not your Pythons

If you installed pyenv with brew install pyenv, Homebrew owns the pyenv program, under /opt/homebrew on Apple silicon or /usr/local on Intel. It does not change where the Pythons go. pyenv's own startup script sets PYENV_ROOT to ~/.pyenv whenever the variable is empty, and the Homebrew formula does not set it, so pyenv install still builds into ~/.pyenv/versions.

Both Homebrew prefixes can exist on one Mac, for example when an Intel-era install survived a migration or Terminal runs under Rosetta. To see every pyenv your shell can find:

which -a pyenv

If it prints two, both still share ~/.pyenv unless one of them is started with a different PYENV_ROOT.

What else is in ~/.pyenv

PathWhat it is
versions/The installed Pythons, one folder each
shims/Tiny launcher scripts named python, pip and so on. pyenv init puts this folder at the front of your PATH so they can pick a version for you
versionA one-line text file holding the global version, set by pyenv global

If you installed pyenv with a Git checkout or the pyenv installer script, ~/.pyenv is also where pyenv's own program files live, and plugins such as pyenv-virtualenv sit in ~/.pyenv/plugins. Do not delete anything except versions/<number> folders without checking what it is.

Which version a folder uses is decided by, in order: the PYENV_VERSION variable (set by pyenv shell), a .python-version file in the current folder or the nearest parent (set by pyenv local), then the global version file. A forgotten .python-version file in a project is the usual reason python --version surprises you. This shows the version in effect and the file that set it:

pyenv version

Virtual environments made with pyenv-virtualenv

The pyenv-virtualenv plugin keeps its environments inside the Python they were built from, at ~/.pyenv/versions/<version>/envs/<name>, and adds a shortcut (a symlink) at ~/.pyenv/versions/<name>. That is why pyenv versions lists each one twice, and why uninstalling a version takes its environments with it. pyenv virtualenvs lists them, and pyenv prefix <name> prints one environment's folder. Environments made with python -m venv are not managed by pyenv at all: they live wherever you created them, usually a .venv folder in a project.

How big it gets and what you can remove

Each version is a complete Python plus whatever packages you added to it, so sizes vary from one Mac to the next. Measure rather than guess:

du -sh ~/.pyenv/versions/*

To remove a version the supported way:

pyenv uninstall 3.9.18

(Use a version from your own list.) The README also allows deleting a version's directory, found with pyenv prefix, but notes that plugins may do extra clean-up on uninstall, such as pyenv-virtualenv removing that version's environments. Before removing a version, check that no project still depends on it: .python-version files and virtual environments built on that version will stop working.

Removing pyenv completely means removing its lines from ~/.zshrc and deleting the whole ~/.pyenv folder, which the README warns deletes every Python under versions/. If Homebrew installed pyenv, also run brew uninstall pyenv. Move the folder to the Trash in Finder rather than using rm -rf, so you can still change your mind.

Moving it

Set PYENV_ROOT in ~/.zshrc, before the line that runs pyenv init, to point at another folder or drive. The README says the variable "defines the directory under which Python versions and shims reside". It does not describe moving already installed versions to a new root, and a compiled Python records the path it was built for, so reinstalling the versions you need under the new root is safer than copying them.

Backing up or moving to a new Mac

Do not copy ~/.pyenv/versions to a new Mac. Pythons built for an Intel Mac do not run natively on Apple silicon, and their install paths are baked in. Note your versions with pyenv versions, install pyenv on the new Mac, and run pyenv install <version> for each. Keep each project's .python-version file and its requirements.txt or lock file, which are small and portable.

Why Spotlight never shows these files

~/.pyenv is a hidden dot-folder, and Spotlight and Finder searches leave hidden folders out of their normal results. Inside, every Python looks the same: a bin folder of files named python3.12, pip and so on, and a lib folder that differs only by version number.

Finding them again later

Typing .python-version into Everywhere lists every project that pins a Python, which is the quickest way to check whether an old version is still needed before you uninstall it. Projects kept in Documents or on the Desktop appear once Everywhere has Full Disk Access; ~/.pyenv itself is covered without it. It matches names only, so it shows where each pin file is but not which version it names. ⌘↵ reveals a result in Finder.

Common questions

Where does pyenv install Python on macOS?

In ~/.pyenv/versions/<version>, because pyenv's root defaults to ~/.pyenv. Run pyenv root to confirm the path on your Mac.

How do I see which Python versions pyenv has installed?

Run pyenv versions. It lists every installed version and marks the active one, and pyenv prefix <version> prints a version's folder.

How do I uninstall a Python version from pyenv?

Run pyenv uninstall <version>, or delete that version's folder under ~/.pyenv/versions. Check that no project or virtual environment still needs it first.

Does Homebrew install pyenv's Python versions in /opt/homebrew?

No. Homebrew installs only the pyenv program. The Pythons you build with pyenv install go under pyenv's root, ~/.pyenv/versions by default, which pyenv root confirms.

Find any file before you finish typing

Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.

Version 2.20.3 · macOS 13+ · 4.7 MB · notarised

Related

© 2026 Caretopia Network Private Limited Everywhere for Mac Buy a licence Articles Privacy Support