Announcing the .NET Core Uninstall Tool 1.0!

Sarah Oslund

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!

11 comments

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

  • Michael Taylor 0

    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.

  • Jason Baginski 0

    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 x64 [Used by Visual Studio 2019. Specify individually or use –force to remove]

    .NET Core Runtimes:
    3.1.2 x86
    3.1.2 x64
    2.2.8 x86
    2.2.8 x64

    dotnet –list-sdks
    2.2.207 [C:\Program Files\dotnet\sdk]
    3.1.101 [C:\Program Files\dotnet\sdk]
    3.1.102 [C:\Program Files\dotnet\sdk]

    dotnet –list-runtimes
    Microsoft.AspNetCore.All 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
    Microsoft.AspNetCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.NETCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.WindowsDesktop.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
    Microsoft.WindowsDesktop.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

    • Sarah OslundMicrosoft employee 0

      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 0

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

        • Sarah OslundMicrosoft employee 0

          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 it in Add or Remove Programs. Visual Studio managed versions are marked as such in their display names from that client.

  • Will Woo 0

    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 window in VStudio, as described in other sources … for older versions ? … unknown. I’m sure not going to waste more time trying them.

    So, how about some due diligence on your part, and either a work-around, or a warning ?

    Bill Woodruff

    CodeProject Mentor
    CodeProject MVP 2015, 2017, 2019, 2020

  • Steve 0

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

  • Giorgi Chakhidze 0

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

  • Jon Miller 0

    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):
    Version: 3.1.1
    Commit: a1388f194c

    .NET Core SDKs installed:
    2.1.202 [C:\Program Files\dotnet\sdk]
    2.1.511 [C:\Program Files\dotnet\sdk]
    2.1.802 [C:\Program Files\dotnet\sdk]
    2.2.402 [C:\Program Files\dotnet\sdk]
    3.1.101 [C:\Program Files\dotnet\sdk]

    .NET Core runtimes installed:
    Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
    Microsoft.AspNetCore.All 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
    Microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
    Microsoft.AspNetCore.All 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
    Microsoft.AspNetCore.All 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
    Microsoft.AspNetCore.All 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
    Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
    Microsoft.AspNetCore.App 2.2.8 [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.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 2.1.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
    Microsoft.NETCore.App 2.2.8 [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]

    To install additional .NET Core runtimes or SDKs:
    https://aka.ms/dotnet-download
    PS C:\Windows\System32> dotnet-core-uninstall.exe remove 2.1.2 –runtime
    The specified version is not found: “2.1.2”.

    • Sarah OslundMicrosoft employee 0

      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!

Feedback usabilla icon