March 10th, 2020

Announcing the .NET Core Uninstall Tool 1.0!

Sarah Oslund
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.

  • 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...

    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 and 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 . Thanks!

      Read more
  • 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...

    Read more
  • Jason Baginski

    Here's my machine with VS 16.4.6 and how I'm confused about the whole 3.1.10x thing and how the removal tool helps get rid of these bits. dotnet --list shows both 3.1.101 and 3.1.102 yet the uninstall tool only shows 3.1.102.

    .NET Core SDKs:
    3.1.102 x86
    3.1.102 x64 [Used by Visual Studio. Specify individually or use --force to remove]
    2.2.207 x86
    2.2.207...

    Read more
    • Sarah OslundMicrosoft employee Author

      This tool can only be used to uninstall versions of the SDK that were installed via standalone installers or Visual Studio versions prior to 16.3. If you installed 3.1.102 manually or it was installed by a recent version of Visual Studio, then this tool cannot be used to uninstall it. For more information, the first section of our docs discuss the limitations of the tool: https://docs.microsoft.com/en-us/dotnet/core/additional-tools/uninstall-tool

      • Jason Baginski

        “Going forward, we’ve updated the Visual Studio behavior”. So, going forward, but not including 16.4.6?

      • Sarah OslundMicrosoft employee Author

        The updated behavior is that Visual Studio versions 16.3 and later manage the versions it installs on its own. As such, this tool does not uninstall versions that Visual Studio manages. In this case, it looks like 3.1.101 is managed by a Visual Studio version that manages its own installs, so we do not display it in the uninstall tool. One way to check if a version is managed by Visual Studio is to view...

        Read more
  • Michael Taylor

    I literally could have used this last week as I ran through the 30+ versions installed and removed most of them one by one.

    Hopefully the tool provides an easy way to uninstall all but the latest of each minor version (2.1, 2.2, etc) because we need to leave around multiple minor versions for testing, we just don’t want the older patches that won’t be used.