Skip to content

[Feature Request] Simple method to remove old versions of modules #485

Open
@silentTeee

Description

Could we offer a flag that could be used along with the upgrade command that allows for the automatic removal of older versions of the module candidates? Something like:
zef upgrade --autoremove @*candidates

Right now if I want to upgrade everything, zef upgrade will simply install the newer module versions in addition to the older versions.

This should certainly continue to be the default behavior, as zef can't make assumptions about what sort of scripts the user system has written and what dependencies those scripts have. But for developers whose scripts have no hard ties to specific versions or who mainly do rapid development with a lot of libraries, they may not even realize that their module collection is growing quietly with each upgrade.

I imagine this is not a simple request (I can picture challenges relating to dependencies and version numbers not always being sequential or even existing on some older repositories, etc), but I think that a feature like this would be a significant Quality-of-Life improvement for the average user.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions