Plan icon indicating copy to clipboard operation
Plan copied to clipboard

Clean up old downloaded dependencies no longer in use

Open AuroraLS3 opened this issue 1 year ago • 3 comments

I would like to be able to..

Automatically clean up /plugins/Plan/libraries folder of unused libraries

Is your feature request related to a problem? Please describe.

When updating library versions the old versions stay behind in the library folder without being deleted.

The resource files generated by DependencyDownload could be read to verify which files should be deleted as they have a hash in them.

AuroraLS3 avatar Jan 28 '24 11:01 AuroraLS3

DependencyManager has a cleanupCacheDirectory method, though that only accounts for the dependenc(y/ies) in that DependencyManager.

I opened https://github.com/Vankka/DependencyDownload/issues/18 for adding the cleanup method to ApplicationDependencyManager (allows managing single-use DependencyManagers) which would make this much easier to solve with multiple DependencyManagers in use

Vankka avatar Feb 17 '24 20:02 Vankka

Thanks! :)

AuroraLS3 avatar Feb 18 '24 06:02 AuroraLS3

Yep looks like using the cleanupCacheDirectory cleans any files not loaded by that DependencyManager, so if used by both, all files will be deleted (but one will fail since it's loaded already

AuroraLS3 avatar Mar 09 '24 17:03 AuroraLS3