cli-lab icon indicating copy to clipboard operation
cli-lab copied to clipboard

Remove all but major versions

Open thesutex opened this issue 1 year ago • 1 comments

I'm trying to use this tool to remove unsupported versions , but choosing point versions is unintuitive as that version changes every month .

Is there a way, or can you add, so that one can say remove all except dotnet 6 and 8 as those are supported and remove the rest. Wildcard support would prob fix this with:

Dotnet-core-uninstall remove --all-but 8.0.* 6.0.* --hosting-bundle

thesutex avatar May 16 '24 14:05 thesutex

I use the equivalent of the following:

# Unsupported
dotnet-core-uninstall dry-run --major-minor 7.0 --runtime
dotnet-core-uninstall dry-run --major-minor 7.0 --sdk
dotnet-core-uninstall dry-run --major-minor 6.0 --runtime
dotnet-core-uninstall dry-run --major-minor 6.0 --sdk

# Cleanup
dotnet-core-uninstall dry-run --all-lower-patches --runtime
dotnet-core-uninstall dry-run --all-lower-patches --sdk

(At the time of writing 8 and 9 are the supported versions.)

jrdodds avatar Feb 13 '25 15:02 jrdodds