March 10th, 2020
0 reactions

Announcing the .NET Core Uninstall Tool 1.0!

Software Engineer

Today we are releasing the .NET Core Uninstall Tool for Windows and Mac!

Starting in Visual Studio 2019 version 16.3, Visual Studio manages the versions of the SDK and runtime it installs. In previous versions, SDKs and runtimes were left on upgrade in case those versions were targeted or pinned with global.json. We realized this was not ideal and might have left many unused .NET Core SDKs and runtimes installed on your machine.

Going forward, we’ve updated the Visual Studio behavior. The .NET Core standalone SDK installer also began removing previous patch versions (the last two digits, for example 3.1.1xx) in .NET Core 3.0. If you want a version of the SDK or runtime that was removed during an update, reinstall it from the .NET Core archive. SDKs and runtimes installed with the standalone installers (such as from the .NET archive) are not removed by Visual Studio.

We are releasing the .NET Core Uninstall Tool to help you get your machine into a more manageable state AND save you some disk space!

If you’d like to see what versions of .NET Core SDKs or runtimes are available on your machine, type dotnet --list-sdks or dotnet --list-runtimes, respectively:

$ dotnet --list-sdks 

3.1.200-preview-014971 [C:\Program Files\dotnet\sdk] 

$ dotnet --list-runtimes 

Microsoft.AspNetCore.All 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] 
Microsoft.AspNetCore.App 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] 
Microsoft.AspNetCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] 
Microsoft.NETCore.App 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] 
Microsoft.NETCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] 
Microsoft.WindowsDesktop.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] 

If the list is short, you can uninstall them using Add or Remove Programs. If uninstalling via that dialog appears tedious, you can download and use the .NET Core Uninstall Tool! For specific commands and detailed instructions, see the .NET Core Uninstall Tool article.

This is a powerful tool and it’s easy to make a mistake. But don’t worry… you can always either run a repair on Visual Studio or reinstall from the .NET Core archive.

Because this tool is based on installers, it works only on Windows and Mac and not on Linux.

Hope this helps!

Author

Sarah Oslund
Software Engineer

Sarah is a Software Engineer on Microsoft's Accessibility Insights team. She is passionate about building tools that enable developers to write high quality and inclusive software.

11 comments

Discussion is closed. Login to edit/delete existing comments.

Sort by :
  • Jon Miller

    I went through and deleted all the superfluous SDKs, but, then, I realized that the runtimes were left behind. How do a remove the runtimes? Maybe I can't since I previously used the --sdk option when removing the SDKs?

    PS C:\Windows\System32> dotnet --info
    .NET Core SDK (reflecting any global.json):
    Version: 3.1.101
    Commit: b377529961

    Runtime Environment:
    OS Name: Windows
    OS Version: 10.0.18363
    OS Platform: Windows
    RID: win10-x64
    Base Path: C:\Program Files\dotnet\sdk\3.1.101\

    Host (useful for support):
    ...

    Read more
    • Sarah OslundMicrosoft employee Author

      You can specify which type of bundle you would like to uninstall with the options listed in our docs: https://docs.microsoft.com/en-us/dotnet/core/additional-tools/uninstall-tool?tabs=windows#options-1
      Note that there are separate --runtime and --aspnet-runtime options. In the example you listed it looks like there isn’t a .NET Core runtime with the version 2.1.2. You can see what versions can be uninstalled and which category they fall into by using dotnet-core-uninstall list. Thanks!

  • Giorgi Chakhidze

    It’s time to say goodbye to my .NET Core 1.0.0-preview1-002702

  • Steve

    Quite interesting that you need to install uninstaller to uninstall installed products 😀

  • Will Woo

    More time wasted using this article:

    Visual Studio Enterprise 16.4.6 in Win 10/64

    once again MS decides my password is not correct: reset password via e-mail code required
    there appears to be no way to get a terminal window in VStudio to enter the commands shown in this article's screen shot.s

    a. see https://stackoverflow.com/q/58346980 for details

    b. old shortcut using command-backtick ... not working.

    Whether various 3rd. party tools can enable a terminal ...

    Read more