Support delete versions in offline package
Feature Request
Is your feature request related to a problem? Please describe:
At current, tiup mirror support merge two version packages to one offline packages. But, it will increase the size of the mirror package. If there is an old version no longer in use, in order to decrease the size of the mirror package, can we drop this version from current mirror package directly, instand of clone a new mirror without this old version from current mirror.
Describe the feature you'd like:
There should be a way to drop/delete a version of all components from current mirror package directly to decrease the size of the mirror package, like tiup mirror delete v4.0.6 or tiup mirror drop v4.0.6
Why the featue is needed:
Describe alternatives you've considered:
Teachability, Documentation, Adoption, Migration Strategy:
Deleting package from repository is no possible by design, however, you can "yank" one with tiup mirror modify command. A yanked version is not able to download and you can manually delete its tarball.
The size of offline mirror increases not only from the new packages merged in, there is also a commits directory in the mirror path that stores all commit history to support revert on errors. If your mirror is merged without any error, and all new packages are available to use, you can safely delete the commits directory.