-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
- I have searched the issues of this repo and believe that this is not a duplicate. -> https://github.com/python-poetry/poetry/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+removing+old+environments
- I have searched the documentation and believe that my question is not covered. --> https://python-poetry.org/docs/managing-environments/#deleting-the-environments
Feature Request
tldr: Is there a way to way to clean up old environments en masse?
context: I often spin up a quick project to explore an idea and then tear it down once I'm past the exploration phase. Using pip, the environment could be co-located to the project i.e. rm <my_project> would also remove the environment. With Poetry, environments are located outside the project, and thus it's possible to delete the project without deleting the environment. As a result, you could have environments at path/to/pypoetry/virtualenvs/ whose projects have been deleted. Currently, Poetry only offers the ability to remove an environment using the CLI from within the project itself; if you've already deleted the project, you need to navigate to path/to/pypoetry/virtualenvs/ and manually remove its hanging environment. It'd be nice if Poetry had a CLI command in which you could remove all environments that no longer correspond to source code directories on the operating system.