Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
This article applies to: ✔️ .NET Uninstall Tool 1.7.521001 and later versions
dotnet-core-uninstall remove
- Remove the specified .NET SDKs or Runtimes.
dotnet-core-uninstall remove <TARGET> [--x64|--x86] <VERSION>...
[-v|--verbosity <LEVEL>] [--force] [-y|--yes]
dotnet-core-uninstall remove <TARGET> [--x64|--x86] <FILTER>
[-v|--verbosity <LEVEL>] [--force] [-y|--yes]
dotnet-core-uninstall remove -h|--help|-?
dotnet-core-uninstall remove <TARGET> <VERSION>...
[-v|--verbosity <LEVEL>] [--force] [-y|--yes]
dotnet-core-uninstall remove <TARGET> <FILTER>
[-v|--verbosity <LEVEL>] [--force] [-y|--yes]
dotnet-core-uninstall remove -h|--help|-?
The dotnet-core-uninstall remove
command removes .NET SDKs and runtimes from the host machine.
TARGET
The type you want to uninstall. Valid options are listed in the Options - TARGET section.
VERSION
The version to uninstall. You can list several versions separated by a space. Response files are also supported.
Tip
Response files are an alternative to placing all the versions on the command line. They're text files, typically with a *.rsp extension, and each version is listed on a separate line. To specify a response file for the VERSION
argument, use the @ character immediately followed by the response file name.
FILTER
Specifies a value used to filter the TARGET
. Valid options are listed in the Options - FILTER section.
--aspnet-runtime
Discovers all the ASP.NET Core runtimes that can be uninstalled with this tool.
--hosting-bundle
Lists all the .NET hosting bundles that can be uninstalled with this tool.
--runtime
Lists all the .NET runtimes that can be uninstalled with this tool.
--sdk
Lists all the .NET SDKs that can be uninstalled with this tool.
--x64
Lists all the x64 .NET SDKs and runtimes that can be uninstalled with this tool.
Note
If --x64
or --x86
isn't specified, then both x64 and x86 will be removed.
--x86
Lists all the x86 .NET SDKs and runtimes that can be uninstalled with this tool.
Note
If --x64
or --x86
isn't specified, then both x64 and x86 will be removed.
These options are exclusive.
--all
Removes all the .NET SDKs and runtimes.
--all-below <VERSION>[ <VERSION>...]
Removes only the .NET SDKs and runtimes with a version smaller than the specified version. The specified version remains installed.
--all-but <VERSION>[ <VERSION>...]
Removes all the .NET SDKs and runtimes, except those versions specified.
--all-but-latest
Removes the .NET SDKs and runtimes, except the highest version.
--all-lower-patches
Removes the .NET SDKs and runtimes superseded by higher patches. This option protects global.json file.
--all-previews
Removes the .NET SDKs and runtimes marked as previews.
--all-previews-but-latest
Removes the .NET SDKs and runtimes marked as previews except the highest preview.
--major-minor <MAJOR_MINOR>
Removes the .NET SDKs and runtimes that match the specified major.minor
version.
-y, --yes
Executes the command without requiring a yes or no confirmation.
--force
Forces removal of versions that might be used by Visual Studio.
-v, --verbosity <LEVEL>
Sets the verbosity level. The default value is normal
. Allowed values are:
q[uiet]
m[inimal]
n[ormal]
d[etailed]
diag[nostic]
.-?|-h|--help
Shows help and usage information
Note
By default, .NET SDKs and runtimes that might be required by Visual Studio or other SDKs are kept. In the following examples, and depending on the state of the machine, some of the specified SDKs and runtimes might remain. To remove all the SDKs and runtimes, list them explicitly as arguments or use the --force
option.
Remove all the .NET runtimes except the version 3.0.0-preview6-27804-01
without requiring yes or no confirmation:
dotnet-core-uninstall remove --all-but 3.0.0-preview6-27804-01 --runtime --yes
Remove all the .NET Core 1.1 SDKs without requiring yes or no confirmation:
dotnet-core-uninstall remove --sdk --major-minor 1.1 -y
Remove the .NET 6.0.301 SDK with no console output:
dotnet-core-uninstall remove 6.0.301 --sdk --yes --verbosity q
Remove all the .NET SDKs that can be safely removed by this tool:
dotnet-core-uninstall remove --all --sdk
Remove all the .NET SDKs that can be removed by this tool, including those SDKs that might be required by Visual Studio (not recommended):
dotnet-core-uninstall remove --all --sdk --force
Remove all the .NET SDKs that are specified in the versions.rsp response file:
dotnet-core-uninstall remove --sdk @versions.rsp
The content of the versions.rsp file is as follows:
2.2.300
6.0.301
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Events
Mar 17, 9 PM - Mar 21, 10 AM
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Publish an ASP.NET Core app - Training
Learn how to publish an ASP.NET Core app for deployment to a web server or cloud service.
Documentation
dotnet-core-uninstall dry-run command - .NET
The dotnet-core-uninstall dry-run command simulates uninstalling the target .NET SDK or runtime. Status is reported for potential removal.
dotnet-core-uninstall list command - .NET
The dotnet-core-uninstall list command lists .NET SDKs and runtimes that can be removed with the tool.
.NET Uninstall Tool overview - .NET
An overview of .NET Uninstall Tool. This tool is a guided command-line tool that removes .NET SDKs and runtimes.