Can't uninstall `dotnet-sdk-10.0.100-osx-arm64` using the latest available uninstall tool version `1.7.656206`
- Dominant language
- C#
- Stars
- 774
- Forks
- 72
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Description
# Goal
- [ ] Uninstall `.NET` I've installed
# Background details
- Installed version: `10.0.100`
- Installed using [`dotnet-sdk-10.0.100-osx-arm64.pkg`](https://builds.dotnet.microsoft.com/dotnet/Sdk/10.0.100/dotnet-sdk-10.0.100-osx-arm64.pkg).
- Uninstaller version: [`1.7.656206`](https://github.com/dotnet/cli-lab/releases/tag/1.7.656206)
- #414
- Uninstaller contents local path: `~/Downloads/dotnet-core-uninstall-osx-arm64`
# Current issue
- [x] Check `dotnet` info
- **✕⃣ Failed**
```zsh
➜ dotnet-core-uninstall-osx-arm64 dotnet --info
zsh: command not found: dotnet
```
- [x] Check if it is installed
- **✔︎⃣ Result**
```zsh
➜ dotnet-core-uninstall-osx-arm64 ls -la /usr/local/share/dotnet/x64
total 400
drwxr-xr-x 12 root wheel 384 Nov 22 00:01 .
drwxr-xr-x 3 root wheel 96 Nov 22 00:01 ..
-rwxr-xr-x 1 root wheel 181 Oct 24 09:30 dnx
-rwxr-xr-x 1 root wheel 117280 Oct 24 00:49 dotnet
drwxr-xr-x 3 root wheel 96 Oct 24 09:27 host
-rw-r--r-- 1 root wheel 1116 Oct 24 07:55 LICENSE.txt
drwxr-xr-x 5 root wheel 160 Nov 22 00:01 packs
drwxr-xr-x 3 root wheel 96 Oct 24 09:30 sdk
drwxr-xr-x 4 root wheel 128 Oct 24 09:30 sdk-manifests
drwxr-xr-x 4 root wheel 128 Nov 22 00:01 shared
drwxr-xr-x 3 root wheel 96 Oct 24 09:30 templates
-rw-r--r-- 1 root wheel 77436 Oct 24 07:55 ThirdPartyNotices.txt
```
- [x] Get the [1.7.656206](https://github.com/dotnet/cli-lab/releases/tag/1.7.656206) uninstaller
- **✔︎⃣ Result**
```zsh
➜ dotnet-core-uninstall-osx-arm64 ls -la
total 146064
drwx------@ 4 zh staff 128 Nov 25 21:01 .
drwx------@ 135 zh staff 4320 Nov 25 21:06 ..
-rwxr-xr-x@ 1 zh staff 74743936 Nov 13 07:35 dotnet-core-uninstall
-rw-r--r--@ 1 zh staff 35960 Nov 13 07:34 dotnet-core-uninstall.pdb
```
- [x] Launch the uninstaller with no params
- **✕⃣ Failed**
```zsh
➜ dotnet-core-uninstall-osx-arm64 ./dotnet-core-uninstall
Unhandled exception. System.AggregateException: One or more errors occurred. (Index was outside the bounds of the array.)
---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.TermInfo.ParameterizedStrings.EvaluateInternal(String format, Int32& pos, FormatParam[] args, Stack`1 stack, FormatParam[]& dynamicVars, FormatParam[]& staticVars)
at System.TermInfo.ParameterizedStrings.Evaluate(String format, FormatParam[] args)
at System.ConsolePal.WriteSetColorString(Boolean foreground, ConsoleColor color)
at System.ConsolePal.RefreshColors(ConsoleColor& toChange, ConsoleColor value)
at System.CommandLine.IO.ConsoleExtensions.SetTerminalForegroundRed(IConsole console)
at System.CommandLine.Invocation.ParseErrorResult.Apply(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.GetResultCode(InvocationContext context)
at System.CommandLine.Invocation.InvocationPipeline.InvokeAsync(IConsole console)
at System.CommandLine.Parsing.ParseResultExtensions.InvokeAsync(ParseResult parseResult, IConsole console)
at System.CommandLine.Parsing.ParserExtensions.InvokeAsync(Parser parser, String[] args, IConsole console)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at Microsoft.DotNet.Tools.Uninstall.Program.Main(String[] args) in /_/src/dotnet-core-uninstall/Program.cs:line 19
[1] 13152 abort ./dotnet-core-uninstall
```
- [x] Check the uninstaller help
- **✔︎⃣ Result**
```zsh
➜ dotnet-core-uninstall-osx-arm64 ./dotnet-core-uninstall -h
dotnet-core-uninstall:
Remove specified .NET Core SDKs or Runtimes. By default, this tool does not uninstall versions that might be needed for
SDKs. Read the documentation for the .NET Core Uninstall Tool at https://aka.ms/dotnet-core-uninstall-docs.
Usage:
dotnet-core-uninstall [options] [command]
Options:
-?, -h, --help Show help and usage information
Commands:
list List .NET Core SDKs or Runtimes that can be removed with this tool.
dry-run, whatif Display .NET Core SDKs and Runtimes that will be removed.
remove Remove the specified .NET Core SDKs or Runtimes.
--version Display .NET Core Uninstall Tool version information.
```
- [x] Check the uninstaller version
- **✔︎⃣ Result**
- `1.7.656206+52a4a5d8ef7416e19e54be196b29c7e8511af8ef`
```zsh
➜ dotnet-core-uninstall-osx-arm64 ./dotnet-core-uninstall --version
1.7.656206+52a4a5d8ef7416e19e54be196b29c7e8511af8ef
```
- [x] `list` versions uninstaller can uninstall
- **✔︎⃣ Result**
- .NET Core SDKs:
- `10.0.100 (x64)`
- .NET Core Runtimes:
- `10.0.0 (x64)`
```zsh
➜ dotnet-core-uninstall-osx-arm64 ./dotnet-core-uninstall list
This tool cannot uninstall versions of the runtime or SDK that are installed using zip/scripts. The versions that can be uninstalled with this tool are:
.NET Core SDKs:
10.0.100 (x64)
.NET Core Runtimes:
10.0.0 (x64)
```
- [x] `dry-run` the uninstaller for `10.0.100` version I have installed
- **✕⃣ Failed**
```zsh
➜ dotnet-core-uninstall-osx-arm64 ./dotnet-core-uninstall dry-run 10.0.100
Unhandled exception. System.AggregateException: One or more errors occurred. (Index was outside the bounds of the array.)
---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.TermInfo.ParameterizedStrings.EvaluateInternal(String format, Int32& pos, FormatParam[] args, Stack`1 stack, FormatParam[]& dynamicVars, FormatParam[]& staticVars)
at System.TermInfo.ParameterizedStrings.Evaluate(String format, FormatParam[] args)
at System.ConsolePal.WriteSetColorString(Boolean foreground, ConsoleColor color)
at System.ConsolePal.RefreshColors(ConsoleColor& toChange, ConsoleColor value)
at System.CommandLine.IO.ConsoleExtensions.SetTerminalForegroundRed(IConsole console)
at System.CommandLine.Builder.CommandLineBuilderExtensions.g__Default|14_1(Exception exception, InvocationContext context)
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__5_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Invocation.InvocationPipeline.InvokeAsync(IConsole console)
at System.CommandLine.Parsing.ParseResultExtensions.InvokeAsync(ParseResult parseResult, IConsole console)
at System.CommandLine.Parsing.ParserExtensions.InvokeAsync(Parser parser, String[] args, IConsole console)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at Microsoft.DotNet.Tools.Uninstall.Program.Main(String[] args) in /_/src/dotnet-core-uninstall/Program.cs:line 19
[1] 13231 abort ./dotnet-core-uninstall dry-run 10.0.100
```
- [x] Just in case try `dry-run` the uninstaller for `10.0.0` version
- **✕⃣ Failed**
```zsh
➜ dotnet-core-uninstall-osx-arm64 ./dotnet-core-uninstall dry-run 10.0.0
Unhandled exception. System.AggregateException: One or more errors occurred. (Index was outside the bounds of the array.)
---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.TermInfo.ParameterizedStrings.EvaluateInternal(String format, Int32& pos, FormatParam[] args, Stack`1 stack, FormatParam[]& dynamicVars, FormatParam[]& staticVars)
at System.TermInfo.ParameterizedStrings.Evaluate(String format, FormatParam[] args)
at System.ConsolePal.WriteSetColorString(Boolean foreground, ConsoleColor color)
at System.ConsolePal.RefreshColors(ConsoleColor& toChange, ConsoleColor value)
at System.CommandLine.IO.ConsoleExtensions.SetTerminalForegroundRed(IConsole console)
at System.CommandLine.Builder.CommandLineBuilderExtensions.g__Default|14_1(Exception exception, InvocationContext context)
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__5_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Invocation.InvocationPipeline.InvokeAsync(IConsole console)
at System.CommandLine.Parsing.ParseResultExtensions.InvokeAsync(ParseResult parseResult, IConsole console)
at System.CommandLine.Parsing.ParserExtensions.InvokeAsync(Parser parser, String[] args, IConsole console)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at Microsoft.DotNet.Tools.Uninstall.Program.Main(String[] args) in /_/src/dotnet-core-uninstall/Program.cs:line 19
[1] 13410 abort ./dotnet-core-uninstall dry-run 10.0.0
```
- [x] What if it's the `dry-run` that's not working? Try `remove` `10.0.100` version I've installed
- **✕⃣ Failed**
```zsh
➜ dotnet-core-uninstall-osx-arm64 ./dotnet-core-uninstall remove 10.0.100
Unhandled exception. System.AggregateException: One or more errors occurred. (Index was outside the bounds of the array.)
---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.TermInfo.ParameterizedStrings.EvaluateInternal(String format, Int32& pos, FormatParam[] args, Stack`1 stack, FormatParam[]& dynamicVars, FormatParam[]& staticVars)
at System.TermInfo.ParameterizedStrings.Evaluate(String format, FormatParam[] args)
at System.ConsolePal.WriteSetColorString(Boolean foreground, ConsoleColor color)
at System.ConsolePal.RefreshColors(ConsoleColor& toChange, ConsoleColor value)
at System.CommandLine.IO.ConsoleExtensions.SetTerminalForegroundRed(IConsole console)
at System.CommandLine.Builder.CommandLineBuilderExtensions.g__Default|14_1(Exception exception, InvocationContext context)
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__5_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Invocation.InvocationPipeline.InvokeAsync(IConsole console)
at System.CommandLine.Parsing.ParseResultExtensions.InvokeAsync(ParseResult parseResult, IConsole console)
at System.CommandLine.Parsing.ParserExtensions.InvokeAsync(Parser parser, String[] args, IConsole console)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at Microsoft.DotNet.Tools.Uninstall.Program.Main(String[] args) in /_/src/dotnet-core-uninstall/Program.cs:line 19
[1] 13457 abort ./dotnet-core-uninstall remove 10.0.100
```
- [x] Just in case try to `remove` `10.0.0` version listed in `list` output.
- **✕⃣ Failed**
```zsh
➜ dotnet-core-uninstall-osx-arm64 ./dotnet-core-uninstall remove 10.0.0
Unhandled exception. System.AggregateException: One or more errors occurred. (Index was outside the bounds of the array.)
---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
at System.TermInfo.ParameterizedStrings.EvaluateInternal(String format, Int32& pos, FormatParam[] args, Stack`1 stack, FormatParam[]& dynamicVars, FormatParam[]& staticVars)
at System.TermInfo.ParameterizedStrings.Evaluate(String format, FormatParam[] args)
at System.ConsolePal.WriteSetColorString(Boolean foreground, ConsoleColor color)
at System.ConsolePal.RefreshColors(ConsoleColor& toChange, ConsoleColor value)
at System.CommandLine.IO.ConsoleExtensions.SetTerminalForegroundRed(IConsole console)
at System.CommandLine.Builder.CommandLineBuilderExtensions.g__Default|14_1(Exception exception, InvocationContext context)
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<b__0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<b__5_0>d.MoveNext()
--- End of stack trace from previous location ---
at System.CommandLine.Invocation.InvocationPipeline.InvokeAsync(IConsole console)
at System.CommandLine.Parsing.ParseResultExtensions.InvokeAsync(ParseResult parseResult, IConsole console)
at System.CommandLine.Parsing.ParserExtensions.InvokeAsync(Parser parser, String[] args, IConsole console)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at Microsoft.DotNet.Tools.Uninstall.Program.Main(String[] args) in /_/src/dotnet-core-uninstall/Program.cs:line 19
[1] 13442 abort ./dotnet-core-uninstall remove 10.0.0
```
Contributor guide
Assessment
This issue has not been assessed yet.