Skip to content

'pyenv uninstall' multiple versions #2336

@adamchainz

Description

@adamchainz

After upgrading python versions, I want to uninstall the old ones. Instinctively I try uninstall a bunch with:

$ pyenv uninstall 3.11.0a6 3.10.3 3.7.11 3.9.10

but this doesn't work:

Usage: pyenv uninstall [-f|--force] <version>

   -f  Attempt to remove the specified version without prompting
       for confirmation. If the version does not exist, do not
       display an error message.

See `pyenv versions` for a complete list of installed versions.

I'd like pyenv uninstall to accept multiple versions, so I don't need to run multiple commands.

Prerequisite

  • Make sure your problem is not listed in the common build problems.
  • Make sure no duplicated issue has already been reported in the pyenv issues. You should look for closed issues, too.
  • Make sure you are not asking us to help solving your specific issue.
    • GitHub issues is opened mainly for development purposes. If you want to ask someone to help solving your problem, go to some community site like Gitter, StackOverflow, etc.
  • Make sure your problem is not derived from packaging (e.g. Homebrew).
    • Please refer to the package documentation for the installation issues, etc.
  • Make sure your problem is not derived from plugins.
    • This repository is maintaining pyenv and the default python-build plugin only. Please refrain from reporting issues of other plugins here.

Description

  • Platform information (e.g. Ubuntu Linux 16.04): macOS
  • OS architecture (e.g. amd64): x86
  • pyenv version: 2.2.5
  • Python version: 3.10.4
  • C Compiler information (e.g. gcc 7.3): clang
  • [n/a] Please attach the debug trace of the failing command as a gist:
    • Run env PYENV_DEBUG=1 <faulty command> 2>&1 | tee trace.log and attach trace.log. E.g. if you have a problem with installing Python, run env PYENV_DEBUG=1 pyenv install -v <version> 2>&1 | tee trace.log (note the -v option to pyenv install).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions