Skip to content

Commit e83080e

Browse files
adegeotdykstra
andauthored
Rewrite the .NET Uninstall Tool page (dotnet#42033)
* Split uninstall tool article into proper cli * Update toc and redirects * fix link * Fix toc/zone links * remove stupid left over core name... ugh * Rewrite the shared portion * Minor * Apply suggestions from code review Co-authored-by: Tom Dykstra <[email protected]> --------- Co-authored-by: Tom Dykstra <[email protected]>
1 parent 109608e commit e83080e

File tree

9 files changed

+638
-539
lines changed

9 files changed

+638
-539
lines changed

.openpublishing.redirection.core.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
"source_path_from_root": "/docs/core/app-types.md",
99
"redirect_url": "/dotnet/core/deploying/index"
1010
},
11+
{
12+
"source_path_from_root": "/docs/core/additional-tools/uninstall-tool.md",
13+
"redirect_url": "/dotnet/core/additional-tools/uninstall-tool-overview"
14+
},
1115
{
1216
"source_path_from_root": "/docs/core/build/distribution-packaging.md",
1317
"redirect_url": "/dotnet/core/distribution-packaging",
Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,189 @@
1+
---
2+
title: dotnet-core-uninstall dry-run command
3+
description: The dotnet-core-uninstall dry-run command simulates uninstalling the target .NET SDK or runtime. Status is reported for potential removal.
4+
author: adegeo
5+
ms.date: 08/04/2024
6+
zone_pivot_groups: operating-systems-set-three
7+
---
8+
9+
# dotnet-core-uninstall dry-run
10+
11+
**This article applies to:** ✔️ .NET Uninstall Tool 1.7.521001 and later versions
12+
13+
## Name
14+
15+
`dotnet-core-uninstall dry-run` - Display .NET SDKs and Runtimes that will be removed.
16+
17+
> [!TIP]
18+
> The `dotnet-core-uninstall whatif` command is the same command as `dry-run`.
19+
20+
## Synopsis
21+
22+
::: zone pivot="os-windows"
23+
24+
```dotnetcli
25+
dotnet-core-uninstall dry-run <TARGET> [--x64|--x86] <VERSION>...
26+
[-v|--verbosity <LEVEL>] [--force]
27+
28+
dotnet-core-uninstall dry-run <TARGET> [--x64|--x86] <FILTER>
29+
[-v|--verbosity <LEVEL>]
30+
31+
dotnet-core-uninstall dry-run -h|--help|-?
32+
```
33+
34+
::: zone-end
35+
36+
::: zone pivot="os-macos"
37+
38+
```dotnetcli
39+
dotnet-core-uninstall dry-run <TARGET> <VERSION>...
40+
[-v|--verbosity <LEVEL>] [--force] [-y|--yes]
41+
42+
dotnet-core-uninstall dry-run <TARGET> <FILTER>
43+
[-v|--verbosity <LEVEL>] [--force] [-y|--yes]
44+
45+
dotnet-core-uninstall dry-run -h|--help|-?
46+
```
47+
48+
::: zone-end
49+
50+
## Description
51+
52+
The `dotnet-core-uninstall list` command simulates .NET SDK and runtime removal. A status output is provided for each .NET SDK and runtime that would have been removed by the tool.
53+
54+
### Arguments
55+
56+
**`TARGET`**
57+
58+
The type you want to uninstall. Valid options are listed in the [Options - TARGET](#options---target) section.
59+
60+
**`VERSION`**
61+
62+
The version to uninstall. You can list several versions separated by a space. Response files are also supported.
63+
64+
> [!TIP]
65+
> 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.
66+
67+
**`FILTER`**
68+
69+
Specifies a value used to filter the `TARGET`. Valid options are listed in the [Options - FILTER](#options---filter) section.
70+
71+
## Options - TARGET
72+
73+
::: zone pivot="os-windows"
74+
75+
- **`--aspnet-runtime`**
76+
77+
Discovers all the ASP.NET Core runtimes that can be uninstalled with this tool.
78+
79+
- **`--hosting-bundle`**
80+
81+
Lists all the .NET hosting bundles that can be uninstalled with this tool.
82+
83+
::: zone-end
84+
85+
- **`--runtime`**
86+
87+
Lists all the .NET runtimes that can be uninstalled with this tool.
88+
89+
- **`--sdk`**
90+
91+
Lists all the .NET SDKs that can be uninstalled with this tool.
92+
93+
::: zone pivot="os-windows"
94+
95+
- **`--x64`**
96+
97+
Lists all the x64 .NET SDKs and runtimes that can be uninstalled with this tool.
98+
99+
> [!NOTE]
100+
> If `--x64` or `--x86` isn't specified, then both x64 and x86 will be removed.
101+
102+
- **`--x86`**
103+
104+
Lists all the x86 .NET SDKs and runtimes that can be uninstalled with this tool.
105+
106+
> [!NOTE]
107+
> If `--x64` or `--x86` isn't specified, then both x64 and x86 will be removed.
108+
109+
::: zone-end
110+
111+
## Options - FILTER
112+
113+
These options are exclusive.
114+
115+
- **`--all`**
116+
117+
Removes all the .NET SDKs and runtimes.
118+
119+
- **`--all-below <VERSION>[ <VERSION>...]`**
120+
121+
Removes only the .NET SDKs and runtimes with a version smaller than the specified version. The specified version remains installed.
122+
123+
- **`--all-but <VERSION>[ <VERSION>...]`**
124+
125+
Removes all the .NET SDKs and runtimes, except those versions specified.
126+
127+
- **`--all-but-latest`**
128+
129+
Removes the .NET SDKs and runtimes, except the highest version.
130+
131+
- **`--all-lower-patches`**
132+
133+
Removes the .NET SDKs and runtimes superseded by higher patches. This option protects _global.json_ file.
134+
135+
- **`--all-previews`**
136+
137+
Removes the .NET SDKs and runtimes marked as previews.
138+
139+
- **`--all-previews-but-latest`**
140+
141+
Removes the .NET SDKs and runtimes marked as previews except the highest preview.
142+
143+
- **`--major-minor <MAJOR_MINOR>`**
144+
145+
Removes the .NET SDKs and runtimes that match the specified `major.minor` version.
146+
147+
## Options
148+
149+
- **`--force`**
150+
151+
Forces removal of versions that might be used by Visual Studio.
152+
153+
- **`-v, --verbosity <LEVEL>`**
154+
155+
Sets the verbosity level. The default value is `normal`. Allowed values are:
156+
157+
- `q[uiet]`
158+
- `m[inimal]`
159+
- `n[ormal]`
160+
- `d[etailed]`
161+
- `diag[nostic]`.
162+
163+
- **`-?|-h|--help`**
164+
165+
Shows help and usage information
166+
167+
> [!NOTE]
168+
> By default, .NET SDKs and runtimes that might be required by Visual Studio or other SDKs aren't included in the `dotnet-core-uninstall dry-run` output. Also, depending on the state of the machine, some of the specified SDKs and runtimes might not be included in the output. To include all the SDKs and runtimes, list them explicitly as arguments or use the `--force` option.
169+
170+
- Dry run of removing all the .NET runtimes that have been superseded by higher patches:
171+
172+
```console
173+
dotnet-core-uninstall dry-run --all-lower-patches --runtime
174+
```
175+
176+
- Dry run of removing all the .NET SDKs below the version `6.0.301`:
177+
178+
```console
179+
dotnet-core-uninstall whatif --all-below 6.0.301 --sdk
180+
```
181+
182+
> [!TIP]
183+
> The `dotnet-core-uninstall whatif` command is the same command as `dry-run`.
184+
185+
## See also
186+
187+
- [.NET uninstall tool overview](uninstall-tool-overview.md)
188+
- [dotnet-core-uninstall list](uninstall-tool-cli-list.md)
189+
- [dotnet-core-uninstall remove](uninstall-tool-cli-remove.md)
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
---
2+
title: dotnet-core-uninstall list command
3+
description: The dotnet-core-uninstall list command lists .NET SDKs and runtimes that can be removed with the tool.
4+
author: adegeo
5+
ms.date: 08/04/2024
6+
zone_pivot_groups: operating-systems-set-three
7+
---
8+
9+
# dotnet-core-uninstall list
10+
11+
**This article applies to:** ✔️ .NET Uninstall Tool 1.7.521001 and later versions
12+
13+
## Name
14+
15+
`dotnet-core-uninstall list` - List .NET SDKs or runtimes that can be removed with this tool.
16+
17+
## Synopsis
18+
19+
::: zone pivot="os-windows"
20+
21+
```dotnetcli
22+
dotnet-core-uninstall list [--aspnet-runtime] [--hosting-bundle]
23+
[--runtime] [--sdk] [-v|--verbosity <LEVEL>] [--x64] [--x86]
24+
25+
dotnet-core-uninstall list -?|-h|--help
26+
```
27+
28+
::: zone-end
29+
30+
::: zone pivot="os-macos"
31+
32+
```dotnetcli
33+
dotnet-core-uninstall list [--runtime] [--sdk] [-v|--verbosity <LEVEL>]
34+
35+
dotnet-core-uninstall list -?|-h|--help
36+
```
37+
38+
::: zone-end
39+
40+
## Description
41+
42+
The `dotnet-core-uninstall list` command lists installed .NET SDKs or runtimes that can be removed with this tool. For more information about the limitations of this tool, see [.NET uninstall tool overview](uninstall-tool-overview.md).
43+
44+
## Options
45+
46+
::: zone pivot="os-windows"
47+
48+
- **`--aspnet-runtime`**
49+
50+
Lists all the ASP.NET Core runtimes that can be uninstalled with this tool.
51+
52+
- **`--hosting-bundle`**
53+
54+
Lists all the .NET hosting bundles that can be uninstalled with this tool.
55+
56+
::: zone-end
57+
58+
- **`--runtime`**
59+
60+
Lists all the .NET runtimes that can be uninstalled with this tool.
61+
62+
- **`--sdk`**
63+
64+
Lists all the .NET SDKs that can be uninstalled with this tool.
65+
66+
- **`-v, --verbosity <LEVEL>`**
67+
68+
Sets the verbosity level. The default value is `normal`. Allowed values are:
69+
70+
- `q[uiet]`
71+
- `m[inimal]`
72+
- `n[ormal]`
73+
- `d[etailed]`
74+
- `diag[nostic]`.
75+
76+
::: zone pivot="os-windows"
77+
78+
- **`--x64`**
79+
80+
Lists all the x64 .NET SDKs and runtimes that can be uninstalled with this tool.
81+
82+
- **`--x86`**
83+
84+
Lists all the x86 .NET SDKs and runtimes that can be uninstalled with this tool.
85+
86+
::: zone-end
87+
88+
- **`-?|-h|--help`**
89+
90+
Shows help and usage information
91+
92+
## Examples
93+
94+
- List all the .NET SDKs and runtimes that can be removed with this tool:
95+
96+
```console
97+
dotnet-core-uninstall list
98+
```
99+
100+
- List all the x64 .NET SDKs and runtimes:
101+
102+
```console
103+
dotnet-core-uninstall list --x64
104+
```
105+
106+
- List all the x86 .NET SDKs:
107+
108+
```console
109+
dotnet-core-uninstall list --sdk --x86
110+
```
111+
112+
## See also
113+
114+
- [.NET uninstall tool overview](uninstall-tool-overview.md)
115+
- [dotnet-core-uninstall dry-run](uninstall-tool-cli-dry-run.md)
116+
- [dotnet-core-uninstall remove](uninstall-tool-cli-remove.md)

0 commit comments

Comments
 (0)