rust-script icon indicating copy to clipboard operation
rust-script copied to clipboard

Option to purge orphaned packages and artifacts

Open gokuldas opened this issue 1 year ago • 0 comments

There currently doesn't seem to be any option to remove the packages and other artifacts from the cache, for just the scripts that don't exist anymore. The only available option is --clear-cache, which clears the entire cache, including those of the scripts that are still live.

Rationale: If you move a script from one location to another and execute it, rust-script creates a new package in the cache and leaves the old one orphaned. A user may wish to clear just the orphaned package and artifacts without losing all the useful objects in the cache.

Suggestion: Add a --gc option to do this.

Thank you!

gokuldas avatar Dec 08 '23 17:12 gokuldas