Skip to content

Can't uninstall dotnet-sdk-10.0.100-osx-arm64 using the latest available uninstall tool version 1.7.656206 #422

@qizh

Description

@qizh

Goal

  • Uninstall .NET I've installed

Background details

Current issue

  • Check dotnet info

    • ✕⃣ Failed

      ➜  dotnet-core-uninstall-osx-arm64 dotnet --info
      zsh: command not found: dotnet
  • Check if it is installed

    • ✔︎⃣ Result

      ➜  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
  • Get the 1.7.656206 uninstaller

    • ✔︎⃣ Result

      ➜  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
  • Launch the uninstaller with no params

    • ✕⃣ Failed

      ➜  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
  • Check the uninstaller help

    • ✔︎⃣ Result

      ➜  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 <VERSION>    Display .NET Core SDKs and Runtimes that will be removed.
        remove <VERSION>             Remove the specified .NET Core SDKs or Runtimes.
        --version                    Display .NET Core Uninstall Tool version information.
  • Check the uninstaller version

    • ✔︎⃣ Result

      • 1.7.656206+52a4a5d8ef7416e19e54be196b29c7e8511af8ef
      ➜  dotnet-core-uninstall-osx-arm64 ./dotnet-core-uninstall --version
      1.7.656206+52a4a5d8ef7416e19e54be196b29c7e8511af8ef
  • list versions uninstaller can uninstall

    • ✔︎⃣ Result

      • .NET Core SDKs:
        • 10.0.100 (x64)
      • .NET Core Runtimes:
        • 10.0.0 (x64)
      ➜  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)
  • dry-run the uninstaller for 10.0.100 version I have installed

    • ✕⃣ Failed

      ➜  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.<UseExceptionHandler>g__Default|14_1(Exception exception, InvocationContext context)
         at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseExceptionHandler>b__0>d.MoveNext()
      --- End of stack trace from previous location ---
         at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<CancelOnProcessTermination>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
  • Just in case try dry-run the uninstaller for 10.0.0 version

    • ✕⃣ Failed

      ➜  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.<UseExceptionHandler>g__Default|14_1(Exception exception, InvocationContext context)
         at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseExceptionHandler>b__0>d.MoveNext()
      --- End of stack trace from previous location ---
         at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<CancelOnProcessTermination>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
  • What if it's the dry-run that's not working? Try remove 10.0.100 version I've installed

    • ✕⃣ Failed

      ➜  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.<UseExceptionHandler>g__Default|14_1(Exception exception, InvocationContext context)
         at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseExceptionHandler>b__0>d.MoveNext()
      --- End of stack trace from previous location ---
         at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<CancelOnProcessTermination>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
  • Just in case try to remove 10.0.0 version listed in list output.

    • ✕⃣ Failed

      ➜  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.<UseExceptionHandler>g__Default|14_1(Exception exception, InvocationContext context)
         at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseExceptionHandler>b__0>d.MoveNext()
      --- End of stack trace from previous location ---
         at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<CancelOnProcessTermination>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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions