Dot Net Core

Roger Roger 6,286 Reputation points
2021-10-11T18:27:39.917+00:00

Hi All

i have latest version of .Dot Net Core and ASP installed on the servers. but still i can see older version installed, how do i remove it. in the below screenshot i have 2.1.12, 3.1.19, 5.0.10 is installed, how can i remove 2.1.12 version experts guide me on this.

139554-21.jpg

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,568 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,492 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,162 questions
{count} votes

Accepted answer
  1. Sreeju Nair 12,346 Reputation points
    2021-10-12T05:39:42.433+00:00

    There is an uninstall tool released by .Net team. The tool lets you clean up .Net SDKs and Runtimes on a system. You can download the tool from the following URL.

    https://github.com/dotnet/cli-lab/releases

    To find more details about the too, refer the following URL

    https://learn.microsoft.com/en-gb/dotnet/core/additional-tools/uninstall-tool?tabs=windows

    Once you installed the tool, you can use the commands, few useful commands are below.

    To list the .Net SDKs & runtimes that can be uninstalled >> dotnet-core-uninstall list

    There is a dry-run option that will displays the SDKs / Runtimes that will be removed based on the options you provided to the command.

    e.g. >> dotnet-core-uninstall dry-run

    For example, the follwoing command will dry run of removing all SDKs below the version 2.2.301

    dotnet-core-uninstall whatif --all-below 2.2.301 --sdk

    and the following command will remove all SDKs below the version 2.2.301

    dotnet-core-uninstall remove --all-below 2.2.301 --sdk

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 65,561 Reputation points
    2021-10-11T20:10:46.073+00:00

    see docs:

    https://learn.microsoft.com/en-us/dotnet/core/install/remove-runtime-sdk-versions?pivots=os-windows

    note: be sure you have no dependencies before deleting (those are the current supported versions)

    0 comments No comments

  2. Brando Zhang-MSFT 3,696 Reputation points Microsoft Vendor
    2021-10-12T06:01:25.043+00:00

    Hi @Roger Roger ,

    According to your description, I suggest you could try to use dotnet uninstall tool to uninstall the SDK.

    You could download it from this github link.

    Then you could use below codes to uninstall the SDK:

    dotnet-core-uninstall remove 2.1.12 --sdk --yes  
    

    More details, you could refer to this article.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.