diff --git a/docs/core/tools/dotnet-workload-clean.md b/docs/core/tools/dotnet-workload-clean.md new file mode 100644 index 0000000000000..ced1eddec136e --- /dev/null +++ b/docs/core/tools/dotnet-workload-clean.md @@ -0,0 +1,42 @@ +--- +title: dotnet workload clean command +description: "The `dotnet workload clean` command removes workload components that might have been left behind from previous updates and uninstallations." +ms.date: 09/29/2025 +--- +# dotnet workload clean + +**This article applies to:** ✔️ .NET 6 SDK and later versions + +## Name + +`dotnet workload clean` - Removes workload components that might have been left behind from previous updates and uninstallations. + +## Synopsis + +```dotnetcli +dotnet workload clean [options] + +dotnet workload clean -?|-h|--help +``` + +## Description + +The `dotnet workload clean` command removes all workload components that have been uninstalled. + +For more information about the `dotnet workload` commands, see the [dotnet workload install](dotnet-workload-install.md#description) command. + +## Options + +- **--all** + + Removes and uninstalls all workload components from all SDK versions. Defaults to `false`. + +[!INCLUDE [help](../../../includes/cli-help.md)] + +## Examples + +- Remove all workflow components: + + ```dotnetcli + dotnet workload clean --all + ``` diff --git a/docs/core/tools/dotnet-workload-history.md b/docs/core/tools/dotnet-workload-history.md new file mode 100644 index 0000000000000..1b2bea7e79091 --- /dev/null +++ b/docs/core/tools/dotnet-workload-history.md @@ -0,0 +1,42 @@ +--- +title: dotnet workload history command +description: "The `dotnet workload history` command shows a history of workload installation actions." +ms.date: 09/29/2025 +--- +# dotnet workload history + +**This article applies to:** ✔️ .NET 6 SDK and later versions + +## Name + +`dotnet workload history` - Shows a history of workload installation actions. + +## Synopsis + +```dotnetcli +dotnet workload history [options] + +dotnet workload history -?|-h|--help +``` + +## Description + +The `dotnet workload history` shows a history of workload installation actions. + +For more information about the `dotnet workload` commands, see the [dotnet workload install](dotnet-workload-install.md#description) command. + +## Options + +- **--all** + + Removes and uninstalls all workload components from all SDK versions. Defaults to `false`. + +[!INCLUDE [help](../../../includes/cli-help.md)] + +## Examples + +- Remove all workflow components: + + ```dotnetcli + dotnet workload history --all + ``` diff --git a/docs/core/tools/dotnet.md b/docs/core/tools/dotnet.md index 03cfa024da649..b77d496cf5150 100644 --- a/docs/core/tools/dotnet.md +++ b/docs/core/tools/dotnet.md @@ -217,9 +217,13 @@ The following options are available only when `dotnet` runs an application by us | Command | Function | |---------------------------------------------------------|-----------------------------------------------------| +| [dotnet workload clean](dotnet-workload-clean.md) | Removes workload components. | +| [dotnet workload config](dotnet-workload-config.md) | Enables or disables workload-set update mode. | +| [dotnet workload history](dotnet-workload-history.md) | Shows all workload installation actions. | | [dotnet workload install](dotnet-workload-install.md) | Installs an optional workload. | | [dotnet workload list](dotnet-workload-list.md) | Lists all installed workloads. | | [dotnet workload repair](dotnet-workload-repair.md) | Repairs all installed workloads. | +| [dotnet workload restore](dotnet-workload-restore.md) | Restore workloads required for a project. | | [dotnet workload search](dotnet-workload-search.md) | List selected workloads or all available workloads. | | [dotnet workload uninstall](dotnet-workload-install.md) | Uninstalls a workload. | | [dotnet workload update](dotnet-workload-update.md) | Reinstalls all installed workloads. | diff --git a/docs/core/tools/index.md b/docs/core/tools/index.md index 8fdb78674e83e..fd4d4a5a6165d 100644 --- a/docs/core/tools/index.md +++ b/docs/core/tools/index.md @@ -102,8 +102,10 @@ The following commands are installed by default: ### Workload management commands - [`workload`](dotnet-workload.md) (Available since .NET 7 SDK) +- [`workload clean`](dotnet-workload-clean.md) (Available since .NET 6 SDK) - [`workload config`](dotnet-workload-config.md) (Available since .NET 8.0.400 SDK) - [`workload install`](dotnet-workload-install.md) (Available since .NET 6 SDK) +- [`workload history`](dotnet-workload-history.md) (Available since .NET 6 SDK) - [`workload list`](dotnet-workload-list.md) (Available since .NET 6 SDK) - [`workload update`](dotnet-workload-update.md) (Available since .NET 6 SDK) - [`workload restore`](dotnet-workload-restore.md) (Available since .NET 6 SDK) diff --git a/docs/navigate/tools-diagnostics/toc.yml b/docs/navigate/tools-diagnostics/toc.yml index 918491470aebb..3b3baf4179a0e 100644 --- a/docs/navigate/tools-diagnostics/toc.yml +++ b/docs/navigate/tools-diagnostics/toc.yml @@ -243,8 +243,12 @@ items: href: ../../core/tools/dotnet-workload.md - name: dotnet workload sets href: ../../core/tools/dotnet-workload-sets.md + - name: dotnet workload clean + href: ../../core/tools/dotnet-workload-clean.md - name: dotnet workload config href: ../../core/tools/dotnet-workload-config.md + - name: dotnet workload history + href: ../../core/tools/dotnet-workload-history.md - name: dotnet workload install href: ../../core/tools/dotnet-workload-install.md - name: dotnet workload list