.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:
- Download the dotnet-core-uninstall-*.msi installer from the the GitHub releases page.
- Run the installer.
Download the dotnet-core-uninstall.tar.gz tarball from the the GitHub releases page.
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:
- Open the Start menu.
- Search for Add or Remove Programs and open it.
- Search for
Microsoft .NET SDK Uninstall Tool
. - Select Uninstall.
If you extracted the dotnet-core-uninstall.tar.gz tarball, delete the extracted files.