Muokkaa

Jaa


.NET uninstall tool overview

The .NET Uninstall tool automates removing .NET SDKs and runtimes from your system. The tool supports Windows and macOS. Linux isn't supported.

Limitations

The tool can only uninstall .NET SDKs and runtimes that were installed using one of the following methods:

  • Installed with a .NET SDK or .NET Runtime installer.
  • Installed by the Visual Studio Installer, but only for Visual Studio 2019 16.3 and earlier.

The tool can only uninstall SDKs and runtimes located in the /usr/local/share/dotnet folder.

Because of these limitations, the tool might not be able to uninstall all of the .NET SDKs and runtimes on your machine. You can use the dotnet --info command to find all of the .NET SDKs and runtimes installed, including those SDKs and runtimes that the tool can't remove. The dotnet-core-uninstall list command displays which SDKs can be uninstalled with the tool.

Install the tool

You can download .NET Uninstall Tool from the tool's releases page and find the source code at the dotnet/cli-lab GitHub repository.

To install the tool, perform the following steps:

  1. Download the dotnet-core-uninstall-*.msi installer from the the GitHub releases page.
  2. Run the installer.
  1. Download the dotnet-core-uninstall.tar.gz tarball from the the GitHub releases page.

  2. Run the following shell script to extract the tarball to a directory named dotnet-core-uninstall in your home directory:

    mkdir -p ~/dotnet-core-uninstall
    tar -zxf dotnet-core-uninstall.tar.gz -C ~/dotnet-core-uninstall
    

Important

The tool requires administrative privileges to uninstall .NET SDKs and runtimes. Therefore, it should be installed in a write-protected directory such as C:\Program Files on Windows or /usr/local/bin on macOS. For more information, see Elevated access for dotnet commands.

Uninstall the tool

To uninstall the tool, perform the following steps:

  1. Open the Start menu.
  2. Search for Add or Remove Programs and open it.
  3. Search for Microsoft .NET SDK Uninstall Tool.
  4. Select Uninstall.

If you extracted the dotnet-core-uninstall.tar.gz tarball, delete the extracted files.

Commands