vscode-java
vscode-java copied to clipboard
Clear out-of-date files in global storage
The extension will store some caches in global storage with each version. Each version will occupy around 15~20MB, which the total size will be quite large when users switched to the pre-release channel.

We can consider detect the out-of-date version and remove it.
I remember @rgrunber mentioned this before: https://github.com/redhat-developer/vscode-java/issues/2285#issuecomment-1126151673 We have already updated to M2E 2.0, so is there any difference on size of the recent versions?
Besides, we can have such logic to clean previous global storage folders.
so is there any difference on size of the recent versions?
Yes the size is smaller. For example, the size if the folder 1.3.0 is ~24MB, while the size of 1.10.2022072204 takes ~16MB
As per discussions, maybe there is some feature to have VS Code clear such cached folders at the platform level ? Or maybe there is something we can take advantage of in VS Code API that can mark those folders for deletion on certain staleness criteria ?