Add cleanup subcommand to remove older tool versions#85
Add cleanup subcommand to remove older tool versions#85givaldolins wants to merge 3 commits intoopenshift:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: givaldolins The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@givaldolins: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Problem
Over time, backplane-tools accumulates multiple versions of each installed tool in ~/.local/bin/backplane/.
Each upgrade creates a new versioned directory while keeping all previous versions, leading to significant disk usage growth. For users who frequently update tools, this can result in hundreds of megabytes or even gigabytes of redundant binaries.
For example, after several updates, a user might have:
Only the latest version (4.21.0) is actually used, but all previous versions remain on disk.
Solution
This PR introduces a new cleanup subcommand that removes all older versions of installed tools while preserving only the currently active version (the one symlinked in latest/).
Usage:
Testing
Manual testing confirmed that the cleanup command successfully removes older versions while preserving the active version and its symlink.