2024年3月23日发(作者:)
How to remove the .NET Core Runtime and SDK
Over time, as you install updated versions of the .NET Core runtime and SDK, you may want to remove outdated versions of .NET Core
from your machine. Removing older versions of the runtime may change the runtime chosen to run shared framework applications, as
detailed in the article on .
The behaviors and the runtime compatibility of .NET Core across updates enables safe removal of previous versions. .NET Core runtime
updates are compatible within a major version 'band' such as 1.x Additionally, newer releases of the .NET Core SDK generally
maintain the ability to build applications that target previous versions of the runtime in a compatible manner.
In general, you only need the latest SDK and latest patch version of the runtimes required for your application. Instances where retaining
older SDK or Runtime versions include maintaining -based applications. Unless your application has specific reasons for
earlier SDKs or runtimes, you may safely remove older versions.
Starting with .NET Core 2.1, the .NET CLI has options you can use to list the versions of the SDK and runtime that are installed on your
machine. Use to see the list of SDKs installed on your machine. Use to see the list of runtimes installed on your machine. The following
text shows typical output for Windows, macOS, or Linux:
C:WINDOWSsystem32>dotnet --list-sdks
1.0.4 [C:Program Filesdotnetsdk]
1.1.0 [C:Program Filesdotnetsdk]
2.0.0 [C:Program Filesdotnetsdk]
2.0.2 [C:Program Filesdotnetsdk]
2.0.3 [C:Program Filesdotnetsdk]
2.1.2 [C:Program Filesdotnetsdk]
2.1.4 [C:Program Filesdotnetsdk]
2.1.100 [C:Program Filesdotnetsdk]
2.1.101 [C:Program Filesdotnetsdk]
2.1.103 [C:Program Filesdotnetsdk]
2.1.104 [C:Program Filesdotnetsdk]
2.1.105 [C:Program Filesdotnetsdk]
2.1.200 [C:Program Filesdotnetsdk]
2.1.201 [C:Program Filesdotnetsdk]
2.1.202 [C:Program Filesdotnetsdk]
2.1.400 [C:Program Filesdotnetsdk]
2.1.401 [C:Program Filesdotnetsdk]
2.1.402 [C:Program Filesdotnetsdk]
2.1.403 [C:Program Filesdotnetsdk]
2.1.500 [C:Program Filesdotnetsdk]
2.1.502 [C:Program Filesdotnetsdk]
2.1.503 [C:Program Filesdotnetsdk]
2.1.504 [C:Program Filesdotnetsdk]
2.1.600-preview-009497 [C:Program Filesdotnetsdk]
2.1.600 [C:Program Filesdotnetsdk]
3.0.100-preview-010184 [C:Program Filesdotnetsdk]
C:WINDOWSsystem32>dotnet --list-runtimes
2.1.2 [C:Program ]
2.1.4 [C:Program ]
2.1.5 [C:Program ]
2.1.6 [C:Program ]
2.1.7 [C:Program ]
2.1.8 [C:Program ]
2.1.2 [C:Program ]
2.1.4 [C:Program ]
2.1.5 [C:Program ]
2.1.6 [C:Program ]
2.1.7 [C:Program ]
2.1.8 [C:Program ]
3.0.0-preview-19075-0444 [C:Program ]
1.0.5 [C:Program ]
1.1.2 [C:Program ]
如何卸载旧版本的dotnetcore
Should I remove a version?
Determine what is installed
2.0.0 [C:Program ]
2.0.3 [C:Program ]
2.0.5 [C:Program ]
2.0.6 [C:Program ]
2.0.7 [C:Program ]
2.0.9 [C:Program ]
2.1.2 [C:Program ]
2.1.3-servicing-26724-03 [C:Program ]
2.1.4 [C:Program ]
2.1.5 [C:Program ]
2.1.6 [C:Program ]
2.1.7 [C:Program ]
2.1.8 [C:Program ]
3.0.0-preview-27324-5 [C:Program ]
3.0.0-preview-27325-3 [C:Program ]
.NET Core uses the Windows Add/Remove Programs dialog to remove versions of the .NET Core runtime and SDK.
The following figure shows the Add/Remove Programs dialog with several versions of the .NET runtime and SDK installed.
Select any versions you want to remove from your machine and click Uninstall.
Uninstalling .NET Core


发布评论