From 95509f1cd1ac0f86c87603bf99cda1ce331a00ff Mon Sep 17 00:00:00 2001 From: Demitrius Nelon Date: Thu, 6 Aug 2026 14:43:49 -0700 Subject: [PATCH] Refresh winget-cli doc mirror to match live CLI behavior - Updated install.md, upgrade.md, show.md, source.md, search.md, list.md, uninstall.md, hash.md, validate.md, settings.md, features.md, export.md, import.md to reflect current live winget --help output (v1.30.100-preview), fixing stale/missing options (e.g. --dependencies-only on install). - Updated index.md to list and link all 18 top-level commands. - Added new pages for previously undocumented commands: pin.md, configure.md, download.md, repair.md, dscv3.md, mcp.md. This mirror is intended as a staging area to validate CLI doc changes locally before contributing corrected content upstream to Microsoft Learn (windows-dev-docs-pr). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../package-manager/winget/configure.md | 111 +++++++++++++ .../package-manager/winget/download.md | 61 ++++++++ doc/windows/package-manager/winget/dscv3.md | 65 ++++++++ doc/windows/package-manager/winget/export.md | 65 +++----- .../package-manager/winget/features.md | 32 ++-- doc/windows/package-manager/winget/hash.md | 28 ++-- doc/windows/package-manager/winget/import.md | 66 ++++---- doc/windows/package-manager/winget/index.md | 90 +++++------ doc/windows/package-manager/winget/install.md | 86 +++++----- doc/windows/package-manager/winget/list.md | 75 +++++---- doc/windows/package-manager/winget/mcp.md | 37 +++++ doc/windows/package-manager/winget/pin.md | 91 +++++++++++ doc/windows/package-manager/winget/repair.md | 63 ++++++++ doc/windows/package-manager/winget/search.md | 55 +++---- .../package-manager/winget/settings.md | 148 ++++++------------ doc/windows/package-manager/winget/show.md | 33 ++-- doc/windows/package-manager/winget/source.md | 123 +++++++-------- .../package-manager/winget/uninstall.md | 48 +++--- doc/windows/package-manager/winget/upgrade.md | 100 +++++++----- .../package-manager/winget/validate.md | 17 +- 20 files changed, 871 insertions(+), 523 deletions(-) create mode 100644 doc/windows/package-manager/winget/configure.md create mode 100644 doc/windows/package-manager/winget/download.md create mode 100644 doc/windows/package-manager/winget/dscv3.md create mode 100644 doc/windows/package-manager/winget/mcp.md create mode 100644 doc/windows/package-manager/winget/pin.md create mode 100644 doc/windows/package-manager/winget/repair.md diff --git a/doc/windows/package-manager/winget/configure.md b/doc/windows/package-manager/winget/configure.md new file mode 100644 index 0000000000..68b875a1ae --- /dev/null +++ b/doc/windows/package-manager/winget/configure.md @@ -0,0 +1,111 @@ +--- +title: configure Command +description: Configures the system into a desired state. +ms.date: 2026-08-06 +ms.topic: overview +ms.localizationpriority: medium +--- + +# configure command (winget) + +The **configure** command of the [winget](index.md) tool ensures that the system matches the desired state described by a configuration file. It may download or execute processors in order to achieve that desired state. + +## Usage + +`winget configure [] [[-f] ] [[--module-path] ] []` + +The following command aliases are available: `configuration`, `dsc` + +## Arguments + +| Argument | Description | +|--------|-------------| +| **-f, --file** | The path to the configuration file. | +| **--module-path** | Specifies the location on the local computer to store modules. Default `%LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules`. | + +## Sub-commands + +| Sub-command | Description | +|-------------|-------------| +| **show** | Shows details of a configuration. | +| **list** | Shows configuration history. | +| **test** | Checks the system against a desired state. | +| **validate** | Validates a configuration file. | +| **export** | Exports configuration resources to a configuration file. | + +## Options + +| Option | Description | +|--------|-------------| +| **--processor-path** | Specify the path to the configuration processor. | +| **-h, --history** | Select items from history. | +| **--accept-configuration-agreements** | Accepts the configuration warning, preventing an interactive prompt. | +| **--suppress-initial-details** | Suppress showing initial configuration details when possible. | +| **--enable** | Enable extended features. Requires store access. | +| **--disable** | Disable extended features. Requires store access. | +| **-?, --help** | Shows help about the selected command. | +| **--wait** | Prompts the user to press any key before exiting. | +| **--logs, --open-logs** | Open the default logs location. | +| **--verbose, --verbose-logs** | Enables verbose logging for winget. | +| **--nowarn, --ignore-warnings** | Suppresses warning outputs. | +| **--disable-interactivity** | Disable interactive prompts. | +| **--proxy** | Set a proxy to use for this execution. | +| **--no-proxy** | Disable the use of proxy for this execution. | + +## Sub-command details + +### show + +Usage: `winget configure show [[-f] ] [[--module-path] ] []` + +Shows details of the provided configuration. + +### list + +Usage: `winget configure list []` + +Shows the high level details for configurations that have been applied to the system. + +Additional options: + +| Option | Description | +|--------|-------------| +| **-h, --history** | Select items from history. | +| **-o, --output** | File where the result is to be written. | +| **--remove** | Remove the item from history. | + +### test + +Usage: `winget configure test [[-f] ] [[--module-path] ] []` + +Checks that the system matches the desired state described by the provided configuration. + +### validate + +Usage: `winget configure validate [-f] [[--module-path] ] []` + +Validates a configuration file for correctness. + +### export + +Usage: `winget configure export []` + +Exports configuration resources to a configuration file. When used with **--all**, it exports all package configurations. When used with **--package-id**, it exports a `WinGetPackage` resource for the given package ID. When used with **--module** and **--resource**, it gets the settings of the resource and exports them to the configuration file. If the output configuration file already exists, the exported configuration resources are appended. + +| Option | Description | +|--------|-------------| +| **-o, --output** | File where the result is to be written. | +| **--package-id** | The package identifier to export. | +| **--module** | The module of the resource to export. | +| **--resource** | The configuration resource to export. | +| **--module-path** | Specifies the location on the local computer to store modules. Default `%LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules`. | +| **--processor-path** | Specify the path to the configuration processor. | +| **-s, --source** | Export packages from the specified source. | +| **--include-versions** | Include package versions in export file. | +| **-r, --recurse, --all** | Exports all package configurations. | +| **--accept-source-agreements** | Accept all source agreements during source operations. | + +## Related topics + +* [Use the winget tool to install and manage applications](index.md) +* [settings command](settings.md) diff --git a/doc/windows/package-manager/winget/download.md b/doc/windows/package-manager/winget/download.md new file mode 100644 index 0000000000..55a3b1d664 --- /dev/null +++ b/doc/windows/package-manager/winget/download.md @@ -0,0 +1,61 @@ +--- +title: download Command +description: Downloads the installer from a given package. +ms.date: 2026-08-06 +ms.topic: overview +ms.localizationpriority: medium +--- + +# download command (winget) + +The **download** command of the [winget](index.md) tool downloads the installer from the selected package, either found by searching a configured source or directly from a manifest. By default, it downloads the appropriate installer to the user's Downloads folder. + +## Usage + +`winget download [[-q] ] []` + +## Arguments + +| Argument | Description | +|--------|-------------| +| **-q, --query** | The query used to search for a package. | + +## Options + +| Option | Description | +|--------|-------------| +| **-d, --download-directory** | Directory where the installers are downloaded to. | +| **-m, --manifest** | The path to the manifest of the package. | +| **--id** | Filter results by id. | +| **--name** | Filter results by name. | +| **--moniker** | Filter results by moniker. | +| **-v, --version** | Use the specified version; default is the latest version. | +| **-s, --source** | Find package using the specified source. | +| **--scope** | Select install scope (user or machine). | +| **-a, --architecture** | Select the architecture. | +| **--installer-type** | Select the installer type. | +| **-e, --exact** | Find package using exact match. | +| **--locale** | Locale to use (BCP47 format). | +| **--ignore-security-hash** | Ignore the installer hash check failure. | +| **--skip-dependencies** | Skips processing package dependencies and Windows features. | +| **--header** | Optional Windows-Package-Manager REST source HTTP header. | +| **--authentication-mode** | Specify authentication window preference (`silent`, `silentPreferred`, or `interactive`). | +| **--authentication-account** | Specify the account to be used for authentication. | +| **--accept-package-agreements** | Accept all license agreements for packages. | +| **--accept-source-agreements** | Accept all source agreements during source operations. | +| **--skip-license, --skip-microsoft-store-package-license** | Skips retrieving Microsoft Store package offline license. | +| **--platform** | Select the target platform. | +| **--os-version** | Target OS version. | +| **-?, --help** | Shows help about the selected command. | +| **--wait** | Prompts the user to press any key before exiting. | +| **--logs, --open-logs** | Open the default logs location. | +| **--verbose, --verbose-logs** | Enables verbose logging for winget. | +| **--nowarn, --ignore-warnings** | Suppresses warning outputs. | +| **--disable-interactivity** | Disable interactive prompts. | +| **--proxy** | Set a proxy to use for this execution. | +| **--no-proxy** | Disable the use of proxy for this execution. | + +## Related topics + +* [Use the winget tool to install and manage applications](index.md) +* [install command](install.md) diff --git a/doc/windows/package-manager/winget/dscv3.md b/doc/windows/package-manager/winget/dscv3.md new file mode 100644 index 0000000000..339258df29 --- /dev/null +++ b/doc/windows/package-manager/winget/dscv3.md @@ -0,0 +1,65 @@ +--- +title: dscv3 Command +description: Provides DSC v3 resource commands for WinGet. +ms.date: 2026-08-06 +ms.topic: overview +ms.localizationpriority: medium +--- + +# dscv3 command (winget) + +The **dscv3** command of the [winget](index.md) tool provides Desired State Configuration (DSC) v3 resources for configuring WinGet and packages. + +## Usage + +`winget dscv3 [] []` + +## Sub-commands + +| Sub-command | Description | +|-------------|-------------| +| **package** | Manage package state. | +| **source** | Manage source configuration. | +| **user-settings-file** | Manage the user settings file. | +| **admin-settings** | Manage administrator settings. | + +## Top-level options + +| Option | Description | +|--------|-------------| +| **--manifest** | Get the resource manifest. | +| **-o, --output** | Directory where the results are to be written. | +| **-?, --help** | Shows help about the selected command. | +| **--wait** | Prompts the user to press any key before exiting. | +| **--logs, --open-logs** | Open the default logs location. | +| **--verbose, --verbose-logs** | Enables verbose logging for winget. | +| **--nowarn, --ignore-warnings** | Suppresses warning outputs. | +| **--disable-interactivity** | Disable interactive prompts. | +| **--proxy** | Set a proxy to use for this execution. | +| **--no-proxy** | Disable the use of proxy for this execution. | + +## Resource subcommands + +Each resource subcommand currently supports the same operational switches. + +| Option | Description | +|--------|-------------| +| **--get** | Get the resource state. | +| **--set** | Set the resource state. | +| **--test** | Test the resource state. | +| **--export** | Get all state instances. | +| **--schema** | Get the resource schema. | +| **--manifest** | Get the resource manifest. | +| **-o, --output** | File where the result is to be written. | + +These options apply to: + +* `winget dscv3 package` +* `winget dscv3 source` +* `winget dscv3 user-settings-file` +* `winget dscv3 admin-settings` + +## Related topics + +* [Use the winget tool to install and manage applications](index.md) +* [configure command](configure.md) diff --git a/doc/windows/package-manager/winget/export.md b/doc/windows/package-manager/winget/export.md index 71308c76df..48c7f08253 100644 --- a/doc/windows/package-manager/winget/export.md +++ b/doc/windows/package-manager/winget/export.md @@ -1,18 +1,16 @@ --- title: export Command -description: exports the list of installed applications. -ms.date: 05/02/2021 +description: Exports the list of installed applications. +ms.date: 2026-08-06 ms.topic: overview ms.localizationpriority: medium --- # export command (winget) -The **export** command of the [winget](index.md) tool exports a JSON file of apps to a specified file. The **export** command users JSON as the format. See [the JSON schema used by **winget**](https://aka.ms/winget-packages.schema.1.0.json). +The **export** command of the [winget](index.md) tool writes a JSON file of installed packages to a specified file. The packages can then be installed with the [**import**](import.md) command. -The **export** combined with the [**import**](import.md) command allows you to batch install applications on your PC. - -The **export** command is often used to create a file that you can share with other developers, or for use when restoring your build environment. +The **export** command is often used to create a file that you can share with other developers or use when restoring your development environment. ## Usage @@ -23,49 +21,34 @@ The **export** command is often used to create a file that you can share with ot ## Arguments The following arguments are available. -| Argument | Description | + +| Argument | Description | |-------------|-------------| -| **-o,--output** | Path to the JSON file to be created +| **-o, --output** | File where the result is to be written. | ## Options -The options allow you to customize the export experience to meet your needs. +The following options are available. | Option | Description | |--------|-------------| -| **-s, --source** | [optional] Specifies a source to export files from. Use this option when you only want files from a specific source. | -| **--include-versions** | [optional] Includes the version of the app currently installed. Use this option if you want a specific version. By default, unless specified, [**import**](import.md) will use latest. | -| **--accept-source-agreements** | Accept all source agreements during source operations | -| **-?, --help** | Shows help about the selected command | -| **--wait** | Prompts the user to press any key before exiting | -| **--logs, --open-logs** | Open the default logs location | -| **--verbose, --verbose-logs** | Enables verbose logging for winget | -| **--disable-interactivity** | Disable interactive prompts | - -## JSON Schema -The driving force behind the **export** command is the JSON file. As mentioned, you can see the [schema for the JSON file](https://aka.ms/winget-packages.schema.1.0.json). - -The JSON file includes the following hierarchy: -| Entry | Description | -|-------------|-------------| -| **Sources** | The sources application manifests come from. | -| **Packages** | The collection of packages to install. | -| **PackageIdentifier** | The Windows Package Manager package identifier used to specify the package. | -| **Version** | [Optional] The specific version of the package to install. | - -## exporting files - -When the Windows Package Manager exports the JSON file, it attempts to export all the applications installed on the PC. If the **winget export** command is not able to match an application to an application from an available **source**, the export command will show a warning. - -Note: matching an application depends on metadata in the manifest from a configured source, and metadata in Add / Remove Programs in Windows based on the package installer. - -In the example below, you will see warnings for **WhatsApp Desktop** and **7-Zip**. - -![export](images/export-command.png) - -Once the export is complete, you can edit the resulting JSON file in your favorite editor. You can remove apps you do not wish to import in the future. +| **-s, --source** | Export packages from the specified source. | +| **--include-versions** | Include package versions in the export file. | +| **--accept-source-agreements** | Accept all source agreements during source operations. | +| **-?, --help** | Shows help about the selected command. | +| **--wait** | Prompts the user to press any key before exiting. | +| **--logs, --open-logs** | Open the default logs location. | +| **--verbose, --verbose-logs** | Enables verbose logging for winget. | +| **--nowarn, --ignore-warnings** | Suppresses warning outputs. | +| **--disable-interactivity** | Disable interactive prompts. | +| **--proxy** | Set a proxy to use for this execution. | +| **--no-proxy** | Disable the use of proxy for this execution. | + +## JSON schema + +The driving force behind the **export** command is the JSON file. You can see the schema at [https://aka.ms/winget-packages.schema.1.0.json](https://aka.ms/winget-packages.schema.1.0.json). ## Related topics * [Use the winget tool to install and manage applications](index.md) - +* [import command](import.md) diff --git a/doc/windows/package-manager/winget/features.md b/doc/windows/package-manager/winget/features.md index 4dc4c53586..0a5a4012c4 100644 --- a/doc/windows/package-manager/winget/features.md +++ b/doc/windows/package-manager/winget/features.md @@ -1,25 +1,39 @@ --- title: features Command -description: Displays the list of experimental features available and the state. -ms.date: 05/5/2021 +description: Displays the list of experimental features available and their state. +ms.date: 2026-08-06 ms.topic: overview ms.localizationpriority: medium --- # features command (winget) -The **features** command of the [winget](index.md) tool displays a list of the experimental features available with your version of the Windows Package Manager. +The **features** command of the [winget](index.md) tool displays the status of experimental features available in your version of Windows Package Manager. -Each feature can be turned on individually by enabling the features through [**settings**](settings.md). - -You can find the latest up to date information on the [experimental features](../../../Settings.md#experimental-features) web page. +Experimental features can be turned on through [**settings**](settings.md). ## Usage +`winget features []` + ![features command](images/features.png) -Notice above that the status of each feature is listed. If the feature is **disabled** you will not be able to use it. If the feature is **enabled** you will notice that the command will be available to you through winget. +## Options + +| Option | Description | +|--------|-------------| +| **-?, --help** | Shows help about the selected command. | +| **--wait** | Prompts the user to press any key before exiting. | +| **--logs, --open-logs** | Open the default logs location. | +| **--verbose, --verbose-logs** | Enables verbose logging for winget. | +| **--nowarn, --ignore-warnings** | Suppresses warning outputs. | +| **--disable-interactivity** | Disable interactive prompts. | +| **--proxy** | Set a proxy to use for this execution. | +| **--no-proxy** | Disable the use of proxy for this execution. | + +Note: features may be managed by Group Policy. You can use `winget --info` to view policies in effect on your system. -To enabled any disabled features, go to **settings** and enable the feature. +## Related topics -Note: features may be managed by group policy. You can use the **winget --info** command to view any policies in effect on your system. +* [Use the winget tool to install and manage applications](index.md) +* [settings command](settings.md) diff --git a/doc/windows/package-manager/winget/hash.md b/doc/windows/package-manager/winget/hash.md index 5339c4c36c..4f6e5fc938 100644 --- a/doc/windows/package-manager/winget/hash.md +++ b/doc/windows/package-manager/winget/hash.md @@ -1,30 +1,30 @@ --- title: winget hash command description: Generates the SHA256 hash for an installer. -ms.date: 04/28/2020 +ms.date: 2026-08-06 ms.topic: article ms.localizationpriority: medium --- # hash command (winget) -The **hash** command of the [winget](index.md) tool generates the SHA256 hash for an installer. This command is used if you need to create a [manifest file](../package/manifest.md) for submitting software to the **Microsoft Community Package Manifest Repository** on GitHub. In addition, the **hash** command also supports generating a SHA256 certificate hash for MSIX files. +The **hash** command of the [winget](index.md) tool generates the SHA256 hash for an installer. This command is commonly used when creating a [manifest file](../package/manifest.md) for submission to the Windows Package Manager repository. It can also compute the hash of the signature file of an MSIX package to enable streaming installations. ## Usage -`winget hash [--file] []` +`winget hash [-f] []` ![hash](images/hash.png) -The **hash** sub-command can only run on a local file. To use the **hash** sub-command, download your installer to a known location. Then pass in the file path as an argument to the **hash** sub-command. +The **hash** command can only run on a local file. Download your installer to a known location, then pass the file path as an argument. ## Arguments The following arguments are available: -| Argument | Description | +| Argument | Description | |--------------|-------------| -| **-f, --file** | The path to the file to be hashed. | +| **-f, --file** | File to be hashed. | ## Options @@ -32,13 +32,15 @@ The following options are available: | Option | Description | |--------|-------------| -| **-m, --msix** | Specifies that the hash command will also create the SHA-256 SignatureSha256 for use with MSIX installers. | -| **-?, --help** | Gets additional help on this command. | -| **--wait** | Prompts the user to press any key before exiting | -| **--logs, --open-logs** | Open the default logs location | -| **--verbose, --verbose-logs** | Enables verbose logging for winget | -| **--disable-interactivity** | Disable interactive prompts | - +| **-m, --msix** | Input file will be treated as MSIX; signature hash will be provided if signed. | +| **-?, --help** | Shows help about the selected command. | +| **--wait** | Prompts the user to press any key before exiting. | +| **--logs, --open-logs** | Open the default logs location. | +| **--verbose, --verbose-logs** | Enables verbose logging for winget. | +| **--nowarn, --ignore-warnings** | Suppresses warning outputs. | +| **--disable-interactivity** | Disable interactive prompts. | +| **--proxy** | Set a proxy to use for this execution. | +| **--no-proxy** | Disable the use of proxy for this execution. | ## Related topics diff --git a/doc/windows/package-manager/winget/import.md b/doc/windows/package-manager/winget/import.md index 4aefa64883..53365fde6e 100644 --- a/doc/windows/package-manager/winget/import.md +++ b/doc/windows/package-manager/winget/import.md @@ -1,16 +1,14 @@ --- title: import Command -description: imports the list of installed applications. -ms.date: 05/02/2021 +description: Installs the packages listed in a file. +ms.date: 2026-08-06 ms.topic: overview ms.localizationpriority: medium --- # import command (winget) -The **import** command of the [winget](index.md) tool imports a JSON file of apps to install. The **import** command combined with the [**export**](export.md) command allows you to batch install applications on your PC. - -The **import** command is often used to share your developer environment or build up your PC image with your favorite apps. +The **import** command of the [winget](index.md) tool installs the packages listed in a JSON file. The **import** command combined with the [**export**](export.md) command allows you to batch install applications on your PC. ## Usage @@ -21,42 +19,36 @@ The **import** command is often used to share your developer environment or buil ## Arguments The following arguments are available. -| Argument | Description | + +| Argument | Description | |-------------|-------------| -| **-i, --import-file** | JSON file describing the packages to install +| **-i, --import-file** | File describing the packages to install. | ## Options -The options allow you to customize the import experience to meet your needs. +The following options are available. | Option | Description | |-------------|-------------| -| **--ignore-unavailable** | Suppresses errors if the app requested is unavailable | -| **--ignore-versions** | Ignores versions specified in the JSON file and installs the latest available version | -| **--no-upgrade** | Skips upgrade if an installed version already exists | -| **--accept-package-agreements** | Accept all license agreements for packages | -| **--accept-source-agreements** | Accept all source agreements during source operations | -| **-?, --help** | Shows help about the selected command | -| **--wait** | Prompts the user to press any key before exiting | -| **--logs, --open-logs** | Open the default logs location | -| **--verbose, --verbose-logs** | Enables verbose logging for winget | -| **--disable-interactivity** | Disable interactive prompts | - -## JSON Schema -The driving force behind the **import** command is the JSON file. You can see the [schema for the JSON file](https://aka.ms/winget-packages.schema.1.0.json). - -The JSON file includes the following hierarchy: -| Entry | Description | -|-------------|-------------| -| **Sources** | The sources application manifests come from. | -| **Packages** | The collection of packages to install. | -| **PackageIdentifier** | The Windows Package Manager package identifier used to specify the package. | -| **Version** | [optional] The specific version of the package to install. | - -## Importing files - -When the Windows Package Manager imports the JSON file, it attempts to install the specified applications in a serial fashion. If the application is not available or the application is already installed, it will notify the user of that case. - -![import](images/import-command.png) - -You will notice in the example above, **Microsoft.VisualStudioCode** and **JanDeDobbeleer.OhMyPosh** were already installed. Therefore the import command skipped the installation. +| **--ignore-unavailable** | Ignore unavailable packages. | +| **--ignore-versions** | Ignore package versions in the import file. | +| **--no-upgrade** | Skips upgrade if an installed version already exists. | +| **--accept-package-agreements** | Accept all license agreements for packages. | +| **--accept-source-agreements** | Accept all source agreements during source operations. | +| **-?, --help** | Shows help about the selected command. | +| **--wait** | Prompts the user to press any key before exiting. | +| **--logs, --open-logs** | Open the default logs location. | +| **--verbose, --verbose-logs** | Enables verbose logging for winget. | +| **--nowarn, --ignore-warnings** | Suppresses warning outputs. | +| **--disable-interactivity** | Disable interactive prompts. | +| **--proxy** | Set a proxy to use for this execution. | +| **--no-proxy** | Disable the use of proxy for this execution. | + +## JSON schema + +The import file follows the schema at [https://aka.ms/winget-packages.schema.1.0.json](https://aka.ms/winget-packages.schema.1.0.json). + +## Related topics + +* [Use the winget tool to install and manage applications](index.md) +* [export command](export.md) diff --git a/doc/windows/package-manager/winget/index.md b/doc/windows/package-manager/winget/index.md index 62e60129df..071f1dd3f8 100644 --- a/doc/windows/package-manager/winget/index.md +++ b/doc/windows/package-manager/winget/index.md @@ -1,14 +1,14 @@ --- title: Use the winget tool to install and manage applications -description: The winget command line tool enables developers to discover, install, upgrade, remove and configure applications on Windows 10 computers. -ms.date: 10/22/2020 +description: The winget command line tool enables developers to discover, install, upgrade, remove, repair, download, configure, and manage applications on Windows computers. +ms.date: 2026-08-06 ms.topic: overview ms.localizationpriority: medium --- # Use the winget tool to install and manage applications -The **winget** command line tool enables users to discover, install, upgrade, remove and configure applications on Windows 10 and Windows 11 computers. This tool is the client interface to the Windows Package Manager service. +The **winget** command line tool enables users to discover, install, upgrade, remove, repair, download, pin, configure, and manage applications on Windows 10 and Windows 11 computers. This tool is the client interface to the Windows Package Manager service. ## Install winget @@ -22,67 +22,64 @@ There are several ways to install the **winget** tool: > The **winget** tool is supported on Windows 10, version 1809 (build 17763) and above. -## Administrator considerations - -Installer behavior can be different depending on whether you are running **winget** with administrator privileges. - -* When running **winget** without administrator privileges, some applications may [require elevation](https://docs.microsoft.com/windows/security/identity-protection/user-account-control/how-user-account-control-works) to install. When the installer runs, Windows will prompt you to [elevate](https://docs.microsoft.com/windows/security/identity-protection/user-account-control/how-user-account-control-works). If you choose not to elevate, the application will fail to install. - -* When running **winget** in an Administrator Command Prompt, you will not see [elevation prompts](https://docs.microsoft.com/windows/security/identity-protection/user-account-control/how-user-account-control-works) if the application requires it. Always use caution when running your command prompt as an administrator, and only install applications you trust. - ## Use winget -After **App Installer** is installed, you can run **winget** by typing 'winget' from a Command Prompt. +After **App Installer** is installed, you can run **winget** by typing `winget` from a Command Prompt. One of the most common usage scenarios is to search for and install a favorite tool. 1. To [search](search.md) for a tool, type `winget search `. -2. After you have confirmed that the tool you want is available, you can [install](install.md) the tool by typing `winget install `. The **winget** tool will launch the installer and install the application on your PC. - ![winget commandline](images/install.png) -3. In addition to install and search, **winget** provides a number of other commands that enable you to [show details](show.md) on applications, [change sources](source.md), and [validate packages](validate.md). To get a complete list of commands, type: `winget --help`. - ![winget help](images/help.png) +2. After you have confirmed that the tool you want is available, you can [install](install.md) the tool by typing `winget install `. +3. To get a complete list of commands, type `winget --help`. ### Commands The current preview of the **winget** tool supports the following commands. + | Command | Description | |---------|-------------| -| [install](install.md) | Installs the specified application. | -| [show](show.md) | Displays details for the specified application. | -| [source](source.md) | Adds, removes, and updates the Windows Package Manager repositories accessed by the **winget** tool. | -| [search](search.md) | Searches for an application. | +| [install](install.md) | Installs the selected package. | +| [show](show.md) | Shows information about a package. | +| [source](source.md) | Manage sources of packages. | +| [search](search.md) | Find and show basic info of packages. | | [list](list.md) | Display installed packages. | -| [upgrade](upgrade.md) | Upgrades the given package. | -| [uninstall](uninstall.md) | Uninstalls the given package. | -| [hash](hash.md) | Generates the SHA256 hash for the installer. | -| [validate](validate.md) | Validates a manifest file for submission to the Windows Package Manager repository. | -| [settings](settings.md) | Open settings. | +| [upgrade](upgrade.md) | Shows and performs available upgrades. | +| [uninstall](uninstall.md) | Uninstalls the selected package. | +| [hash](hash.md) | Helper to hash installer files. | +| [validate](validate.md) | Validates a manifest file. | +| [settings](settings.md) | Open settings or set administrator settings. | | [features](features.md) | Shows the status of experimental features. | | [export](export.md) | Exports a list of the installed packages. | | [import](import.md) | Installs all the packages in a file. | -| pin | Manage package pins. | -| configure | Configures the system into a desired state. | -| download | Downloads the installer from a given package. | +| [pin](pin.md) | Manage package pins. | +| [configure](configure.md) | Configures the system into a desired state. | +| [download](download.md) | Downloads the installer from a given package. | +| [repair](repair.md) | Repairs the selected package. | +| [dscv3](dscv3.md) | DSC v3 resource commands. | +| [mcp](mcp.md) | MCP information. | ### Options -The current version of the **winget** tool supports the following options. +The current version of the **winget** tool supports the following global options. | Option | Description | |--------------|-------------| -| **-v, --version** | Returns the current version of winget. | -| **--info** | Provides you with all detailed information on winget, including the links to the license, privacy statement, and configured group policies. | -| **-?, --help** | Shows additional help for winget. | -| **--wait** | Waits for user input upon command completion. | -| **--logs,--open-logs** | Open the default logs location | -| **--verbose,--verbose-logs** | Enables verbose logging for winget | -| **--disable-interactivity** | Disable interactive prompts | +| **-v, --version** | Display the version of the tool. | +| **--info** | Display general info of the tool. | +| **-?, --help** | Shows help about the selected command. | +| **--wait** | Prompts the user to press any key before exiting. | +| **--logs, --open-logs** | Open the default logs location. | +| **--verbose, --verbose-logs** | Enables verbose logging for winget. | +| **--nowarn, --ignore-warnings** | Suppresses warning outputs. | +| **--disable-interactivity** | Disable interactive prompts. | +| **--proxy** | Set a proxy to use for this execution. | +| **--no-proxy** | Disable the use of proxy for this execution. | ## Supported installer formats The current version of the **winget** tool supports the following types of installers: -* EXE (with **Silent** and **SilentWithProgress** flags) +* EXE * INNO * NULLSOFT * MSI @@ -107,20 +104,7 @@ winget install Microsoft.WindowsTerminal if %ERRORLEVEL% EQU 0 Echo Terminal installed successfully. %ERRORLEVEL% ``` -> When scripted, **winget** will launch the applications in the specified order. When an installer returns success or failure, **winget** will launch the next installer. If an installer launches another process, it is possible that it will return to **winget** prematurely. This will cause **winget** to install the next installer before the previous installer has completed. - -## Missing tools - -If the [community repository](../package/repository.md) does not include your tool or application, please submit a package to our [repository](https://github.com/microsoft/winget-pkgs). By adding your favorite tool, it will be available to you and everyone else. - -## Customize winget settings - -You can configure the **winget** command line experience by modifying the **settings.json** file. For more information, see [https://aka.ms/winget-settings](https://aka.ms/winget-settings). Note that the settings are still in an experimental state and not yet finalized for the preview version of the tool. - -## Open source details - -The **winget** tool is open source software available on GitHub in the repo [https://github.com/microsoft/winget-cli/](https://github.com/microsoft/winget-cli/). The source for building the client is located in the [src folder](https://github.com/microsoft/winget-cli/tree/master/src). - -The source for **winget** is contained in a Visual Studio solution. To build the solution correctly, install the latest [Visual Studio with the C++ workload](https://visualstudio.microsoft.com/downloads/). +## Related topics -We encourage you to contribute to the **winget** source on GitHub. You must first agree to and sign the Microsoft CLA. +* [help command](help.md) +* [WinGet return codes](returnCodes.md) diff --git a/doc/windows/package-manager/winget/install.md b/doc/windows/package-manager/winget/install.md index 9d8a620544..f2cb820ae1 100644 --- a/doc/windows/package-manager/winget/install.md +++ b/doc/windows/package-manager/winget/install.md @@ -1,7 +1,7 @@ --- title: install Command description: Installs the specified application. -ms.date: 04/28/2020 +ms.date: 2026-08-06 ms.topic: overview ms.localizationpriority: medium --- @@ -10,11 +10,11 @@ ms.localizationpriority: medium The **install** command of the [winget](index.md) tool installs the specified application. Use the [**search**](search.md) command to identify the application you want to install. -The **install** command requires that you specify the exact string to install. If there is any ambiguity, you will be prompted to further filter the **install** command to an exact application. +The **install** command requires that you specify the exact string to install. If there is any ambiguity, you will be prompted to further filter the **install** command to an exact application. ## Usage -`winget install [[-q] ] []` +`winget install [[-q] ...] []` The following command aliases are available: \ `add` @@ -27,7 +27,7 @@ The following arguments are available. | Argument | Description | |-------------|-------------| -| **-q, --query** | The query used to search for an app. | +| **-q, --query** | The query used to search for a package. | ## Options @@ -35,41 +35,47 @@ The options allow you to customize the install experience to meet your needs. | Option | Description | |-------------|-------------| -| **-m, --manifest** | Must be followed by the path to the manifest (YAML) file. You can use the manifest to run the install experience from a [local YAML file](#local-install). | -| **--id** | Limits the install to the ID of the application. | -| **--name** | Limits the search to the name of the application. | -| **--moniker** | Limits the search to the moniker listed for the application. | -| **-v, --version** | Enables you to specify an exact version to install. If not specified, latest will install the highest versioned application. | -| **-s, --source** | Restricts the search to the source name provided. Must be followed by the source name. | -| **--scope** | Select install scope (user or machine) | -| **-e, --exact** | Uses the exact string in the query, including checking for case-sensitivity. It will not use the default behavior of a substring. | -| **-i, --interactive** | Runs the installer in interactive mode. The default experience shows installer progress. | -| **-h, --silent** | Runs the installer in silent mode. This suppresses all UI. The default experience shows installer progress. | -| **-o, --log** | Directs the logging to a log file. You must provide a path to a file that you have the write rights to. | -| **--override** | A string that will be passed directly to the installer. | +| **-m, --manifest** | The path to the manifest of the package. You can use the manifest to run the install experience from a [local YAML file](#local-install). | +| **--id** | Filter results by id. | +| **--name** | Filter results by name. | +| **--moniker** | Filter results by moniker. | +| **-v, --version** | Use the specified version; default is the latest version. | +| **-s, --source** | Find package using the specified source. | +| **--scope** | Select install scope (user or machine). | +| **-a, --architecture** | Select the architecture. | +| **--installer-type** | Select the installer type. | +| **-e, --exact** | Find package using exact match. | +| **-i, --interactive** | Request interactive installation; user input may be needed. | +| **-h, --silent** | Request silent installation. | +| **--locale** | Locale to use (BCP47 format). | +| **-o, --log** | Log location (if supported). | +| **--custom** | Arguments to be passed on to the installer in addition to the defaults. | +| **--override** | Override arguments to be passed on to the installer. | | **-l, --location** | Location to install to (if supported). | -| **--force** | Override the installer hash check. | -| **-a, --architecture** | Select the architecture | -| **--installer-type** | Select the installer type | -| **--locale** | Locale to use (BCP47 format) | -| **--custom** | Arguments to be passed on to the installer in addition to the defaults | -| **--ignore-security-hash** | Ignore the installer hash check failure | -| **--skip-dependencies** | Skip processing package dependencies and Windows features | -| **--ignore-local-archive-malware-scan** | Ignore the malware scan performed as part of installing an archive-type package from a local manifest | -| **--ignore-unavailable** | Ignore unavailable packages when installing multiple packages; remaining packages continue to install | -| **--dependency-source** | Find package dependencies using the specified source | -| **--accept-package-agreements** | Accept all license agreements for packages | -| **--no-upgrade** | Skip upgrade if an installed version already exists | -| **--header** | Optional Windows-Package-Manager REST source HTTP header | -| **--accept-source-agreements** | Accept all source agreements during source operations | -| **-r, --rename** | The value to rename the executable file (portable) | -| **--uninstall-previous** | Uninstall the previous version of the package during the upgrade | -| **--ignore-interactivity** | Disable interactive prompts | -| **-?, --help** | Get additional help on this command. | -| **--wait** | Prompts the user to press any key before exiting | -| **--logs, --open-logs** | Open the default logs location | -| **--verbose, --verbose-logs** | Enables verbose logging for winget | -| **--disable-interactivity** | Disable interactive prompts | +| **--ignore-security-hash** | Ignore the installer hash check failure. | +| **--allow-reboot** | Allows a reboot if applicable. | +| **--skip-dependencies** | Skips processing package dependencies and Windows features. | +| **--dependencies-only** | Installs only the dependencies of the package. | +| **--ignore-local-archive-malware-scan** | Ignore the malware scan performed as part of installing an archive type package from local manifest. | +| **--dependency-source** | Find package dependencies using the specified source. | +| **--accept-package-agreements** | Accept all license agreements for packages. | +| **--no-upgrade** | Skips upgrade if an installed version already exists. | +| **--header** | Optional Windows-Package-Manager REST source HTTP header. | +| **--authentication-mode** | Specify authentication window preference (`silent`, `silentPreferred`, or `interactive`). | +| **--authentication-account** | Specify the account to be used for authentication. | +| **--accept-source-agreements** | Accept all source agreements during source operations. | +| **-r, --rename** | The value to rename the executable file (portable). | +| **--uninstall-previous** | Uninstall the previous version of the package during upgrade. | +| **--force** | Direct run the command and continue with non security related issues. | +| **--ignore-unavailable** | Ignore unavailable packages. | +| **-?, --help** | Shows help about the selected command. | +| **--wait** | Prompts the user to press any key before exiting. | +| **--logs, --open-logs** | Open the default logs location. | +| **--verbose, --verbose-logs** | Enables verbose logging for winget. | +| **--nowarn, --ignore-warnings** | Suppresses warning outputs. | +| **--disable-interactivity** | Disable interactive prompts. | +| **--proxy** | Set a proxy to use for this execution. | +| **--no-proxy** | Disable the use of proxy for this execution. | ### Example queries @@ -95,7 +101,7 @@ winget install --id Microsoft.PowerToys --version 0.15.2 If the query provided to **winget** does not result in a single application, then **winget** will display the results of the search. This will provide you with the additional data necessary to refine the search for a correct install. -The best way to limit the selection to one file is to use the **id** of the application combined with the **exact** query option. For example: +The best way to limit the selection to one package is to use the **id** of the application combined with the **exact** query option. For example: ```CMD winget install --id Git.Git -e @@ -119,7 +125,7 @@ Usage: `winget install --manifest ` ### Log files -The log files for winget unless redirected, will be located in the following folder: **\%temp%\\AICLI\\*.log** +The log files for winget unless redirected, will be located in the following folder: **%TEMP%\\AICLI\\*.log** ## Related topics diff --git a/doc/windows/package-manager/winget/list.md b/doc/windows/package-manager/winget/list.md index 81a91dc5b5..d755faa845 100644 --- a/doc/windows/package-manager/winget/list.md +++ b/doc/windows/package-manager/winget/list.md @@ -1,18 +1,16 @@ --- -title: features Command -description: Displays the list of listed apps and if an update is available. -ms.date: 05/5/2021 +title: list Command +description: Displays installed packages and whether upgrades are available. +ms.date: 2026-08-06 ms.topic: overview ms.localizationpriority: medium --- # list command (winget) -The **list** command of the [winget](index.md) tool displays a list of the applications currently installed on your computer. The list command will show apps that were installed through the Windows Package Manager as well as apps that were installed by other means. +The **list** command of the [winget](index.md) tool displays the packages installed on the system, as well as whether an upgrade is available. The **list** command shows packages that were installed through Windows Package Manager as well as packages installed by other means. -In addition, the **list** command will also display if an update is available for an app, and you can use the [**upgrade**](upgrade.md) command to update the app. - -The **list** command also supports filters which can be used to limit your list query. +The **list** command also supports filters that can be used to limit the results. ## Usage @@ -29,43 +27,50 @@ The following arguments are available. | Argument | Description | |-------------|-------------| -| **-q,--query** | The query used to search for an app. | +| **-q, --query** | The query used to search for a package. | ## Options The options allow you to customize the list experience to meet your needs. + | Option | Description | |--------|-------------| -| **--id** | Limits the list to the ID of the application. | -| **--name** | Limits the list to the name of the application. | -| **--moniker** | Limits the list to the moniker listed for the application. | -| **-s, --source** | Restricts the list to the source name provided. Must be followed by the source name. | -| **--tag** | Filters results by tags. | -| **--command** | Filters results by command specified by the application. | -| **-n, --count** | Limits the number of apps displayed in one query. | -| **-e, --exact** | Uses the exact string in the list query, including checking for case-sensitivity. It will not use the default behavior of a substring. | +| **--id** | Filter results by id. | +| **--name** | Filter results by name. | +| **--moniker** | Filter results by moniker. | +| **-s, --source** | Find package using the specified source. | +| **--tag** | Filter results by tag. | +| **--cmd, --command** | Filter results by command. | +| **-n, --count** | Show no more than the specified number of results (between 1 and 1000). | +| **-e, --exact** | Find package using exact match. | | **--scope** | Select installed package scope filter (user or machine). | | **--header** | Optional Windows-Package-Manager REST source HTTP header. | +| **--authentication-mode** | Specify authentication window preference (`silent`, `silentPreferred`, or `interactive`). | +| **--authentication-account** | Specify the account to be used for authentication. | | **--accept-source-agreements** | Accept all source agreements during source operations. | | **--upgrade-available** | Lists only packages which have an upgrade available. | -| **-u,--unknown,--include-unknown** | List packages even if their current version cannot be determined. Can only be used with the --upgrade-available argument. | -| **--pinned,--include-pinned** | List packages even if they have a pin that prevents upgrade. Can only be used with the --upgrade-available argument. | -| **--sort** | Sort results by a property. Can be repeated for multi-field sorting (e.g., `--sort source --sort name`). Valid values: `name`, `id`, `version`, `source`, `available`, `relevance`. | -| **--ascending,--asc** | Sort results in ascending order (default). | -| **--descending,--desc** | Sort results in descending order. | -| **-?,--help** | Get additional help on this command. | +| **-u, --unknown, --include-unknown** | List packages even if their current version cannot be determined. Can only be used with the **--upgrade-available** argument. | +| **--pinned, --include-pinned** | List packages even if they have a pin that prevents upgrade. Can only be used with the **--upgrade-available** argument. | +| **--details** | Show detailed information about packages. | +| **--sort** | Sort results by a property. Can be repeated for multi-field sorting. | +| **--asc, --ascending** | Sort results in ascending order. | +| **--desc, --descending** | Sort results in descending order. | +| **-?, --help** | Shows help about the selected command. | | **--wait** | Prompts the user to press any key before exiting. | -| **--logs,--open-logs** | Open the default logs location. | -| **--verbose,--verbose-logs** | Enables verbose logging for winget. | +| **--logs, --open-logs** | Open the default logs location. | +| **--verbose, --verbose-logs** | Enables verbose logging for winget. | +| **--nowarn, --ignore-warnings** | Suppresses warning outputs. | | **--disable-interactivity** | Disable interactive prompts. | +| **--proxy** | Set a proxy to use for this execution. | +| **--no-proxy** | Disable the use of proxy for this execution. | ### Example queries -The following example lists a specific version of an application. +The following example lists a specific application by name. ![list name command](images/list-name.png) -The following example lists all application by ID from a specific source. +The following example lists an application by ID from a specific source. ![list id with source command](images/list-id-source.png) @@ -75,7 +80,7 @@ The following example limits the output of list to 9 apps. ## Sorting output -By default, results are sorted by name in ascending order. When a query argument is used (for example, `winget list foo`), results preserve relevance ordering from the package source. You can override either default through command-line arguments or user settings. +By default, results are sorted by name in ascending order. When a query argument is used, results preserve relevance ordering from the package source unless you override it. ### Sort via command-line arguments @@ -99,26 +104,16 @@ You can set a default sort order in your [settings](https://aka.ms/winget-settin } ``` -An empty array (`[]`) results in default sorting (sorted by name when listing, relevance preserved when querying). - -### Resolution order +An empty array (`[]`) results in default sorting. -When both settings and command-line arguments are present, the following priority applies: +## List with update -1. **`--sort` command-line argument** — takes highest priority, overrides settings. -2. **`output.sortOrder` in settings** — used when no `--sort` argument is provided. If the user has configured a sort order in settings, it is applied even when a query is present. -3. **Default** — sorted by name in ascending order. When a query is used, relevance ordering is preserved instead. - -## List with Update - -As stated above, the **list** command allows you to see what apps you have installed that have updates available. +The **list** command can show apps that have updates available. In the image below, you will notice the current version of **Google Chrome** has an update available. ![list update command](images/list-update.png) -The **list** command will show not only the update version available, but the source that the update is available from. - ## Related topics * [Use the winget tool to install and manage applications](index.md) diff --git a/doc/windows/package-manager/winget/mcp.md b/doc/windows/package-manager/winget/mcp.md new file mode 100644 index 0000000000..b482034288 --- /dev/null +++ b/doc/windows/package-manager/winget/mcp.md @@ -0,0 +1,37 @@ +--- +title: mcp Command +description: Displays MCP information and manages extended features. +ms.date: 2026-08-06 +ms.topic: overview +ms.localizationpriority: medium +--- + +# mcp command (winget) + +The **mcp** command of the [winget](index.md) tool displays Model Context Protocol (MCP) information for Windows Package Manager. + +Live help for **winget mcp** currently exposes enable and disable switches for extended features. + +## Usage + +`winget mcp []` + +## Options + +| Option | Description | +|--------|-------------| +| **--enable** | Enable extended features. Requires store access. | +| **--disable** | Disable extended features. Requires store access. | +| **-?, --help** | Shows help about the selected command. | +| **--wait** | Prompts the user to press any key before exiting. | +| **--logs, --open-logs** | Open the default logs location. | +| **--verbose, --verbose-logs** | Enables verbose logging for winget. | +| **--nowarn, --ignore-warnings** | Suppresses warning outputs. | +| **--disable-interactivity** | Disable interactive prompts. | +| **--proxy** | Set a proxy to use for this execution. | +| **--no-proxy** | Disable the use of proxy for this execution. | + +## Related topics + +* [Use the winget tool to install and manage applications](index.md) +* [features command](features.md) diff --git a/doc/windows/package-manager/winget/pin.md b/doc/windows/package-manager/winget/pin.md new file mode 100644 index 0000000000..71323a5531 --- /dev/null +++ b/doc/windows/package-manager/winget/pin.md @@ -0,0 +1,91 @@ +--- +title: pin Command +description: Manages package pins. +ms.date: 2026-08-06 +ms.topic: overview +ms.localizationpriority: medium +--- + +# pin command (winget) + +The **pin** command of the [winget](index.md) tool manages package pins. A pin can limit Windows Package Manager from upgrading a package to specific ranges of versions, or it can prevent the package from being upgraded altogether. + +## Usage + +`winget pin [] []` + +## Sub-commands + +| Sub-command | Description | +|-------------|-------------| +| **add** | Add a new pin. | +| **remove** | Remove a package pin. | +| **list** | List current pins. | +| **reset** | Reset pins. | + +## Options + +| Option | Description | +|--------|-------------| +| **-?, --help** | Shows help about the selected command. | +| **--wait** | Prompts the user to press any key before exiting. | +| **--logs, --open-logs** | Open the default logs location. | +| **--verbose, --verbose-logs** | Enables verbose logging for winget. | +| **--nowarn, --ignore-warnings** | Suppresses warning outputs. | +| **--disable-interactivity** | Disable interactive prompts. | +| **--proxy** | Set a proxy to use for this execution. | +| **--no-proxy** | Disable the use of proxy for this execution. | + +## add + +Adds a new pin. + +Usage: `winget pin add [[-q] ] []` + +| Option | Description | +|--------|-------------| +| **--id** | Filter results by id. | +| **--name** | Filter results by name. | +| **--moniker** | Filter results by moniker. | +| **--tag** | Filter results by tag. | +| **--cmd, --command** | Filter results by command. | +| **-e, --exact** | Find package using exact match. | +| **-v, --version** | Version to which to pin the package. The wildcard `*` can be used as the last version part. | +| **-s, --source** | Find package using the specified source. | +| **--header** | Optional Windows-Package-Manager REST source HTTP header. | +| **--authentication-mode** | Specify authentication window preference (`silent`, `silentPreferred`, or `interactive`). | +| **--authentication-account** | Specify the account to be used for authentication. | +| **--accept-source-agreements** | Accept all source agreements during source operations. | +| **--force** | Direct run the command and continue with non security related issues. | +| **--blocking** | Block from upgrading until the pin is removed, preventing override arguments. | +| **--installed** | Pin a specific installed version. | + +## list + +Lists all current pins, or full details of a specific pin. + +Usage: `winget pin list [[-q] ] []` + +## remove + +Removes a specific package pin. + +Usage: `winget pin remove [[-q] ] []` + +Additional option: **--installed** targets a specific installed version. + +## reset + +Resets all existing pins. + +Usage: `winget pin reset []` + +| Option | Description | +|--------|-------------| +| **--force** | Direct run the command and continue with non security related issues. | +| **-s, --source** | Find package using the specified source. | + +## Related topics + +* [Use the winget tool to install and manage applications](index.md) +* [upgrade command](upgrade.md) diff --git a/doc/windows/package-manager/winget/repair.md b/doc/windows/package-manager/winget/repair.md new file mode 100644 index 0000000000..4ac5a5d644 --- /dev/null +++ b/doc/windows/package-manager/winget/repair.md @@ -0,0 +1,63 @@ +--- +title: repair Command +description: Repairs the selected package. +ms.date: 2026-08-06 +ms.topic: overview +ms.localizationpriority: medium +--- + +# repair command (winget) + +The **repair** command of the [winget](index.md) tool repairs the selected package, either found by searching the installed packages list or directly from a manifest. + +## Usage + +`winget repair [[-q] ] []` + +The following command aliases are available: `fix` + +## Arguments + +| Argument | Description | +|--------|-------------| +| **-q, --query** | The query used to search for a package. | + +## Options + +| Option | Description | +|--------|-------------| +| **-m, --manifest** | The path to the manifest of the package. | +| **--id** | Filter results by id. | +| **--name** | Filter results by name. | +| **--moniker** | Filter results by moniker. | +| **-v, --version** | The version to act upon. | +| **--product-code** | Filters using the product code. | +| **-a, --architecture** | Select the architecture. | +| **--scope** | Select installed package scope filter (user or machine). | +| **-s, --source** | Find package using the specified source. | +| **-i, --interactive** | Request interactive installation; user input may be needed. | +| **-h, --silent** | Request silent installation. | +| **-o, --log** | Log location (if supported). | +| **--ignore-local-archive-malware-scan** | Ignore the malware scan performed as part of installing an archive type package from local manifest. | +| **--accept-source-agreements** | Accept all source agreements during source operations. | +| **--accept-package-agreements** | Accept all license agreements for packages. | +| **--locale** | Locale to use (BCP47 format). | +| **--header** | Optional Windows-Package-Manager REST source HTTP header. | +| **--authentication-mode** | Specify authentication window preference (`silent`, `silentPreferred`, or `interactive`). | +| **--authentication-account** | Specify the account to be used for authentication. | +| **--force** | Direct run the command and continue with non security related issues. | +| **--ignore-security-hash** | Ignore the installer hash check failure. | +| **-e, --exact** | Find package using exact match. | +| **-?, --help** | Shows help about the selected command. | +| **--wait** | Prompts the user to press any key before exiting. | +| **--logs, --open-logs** | Open the default logs location. | +| **--verbose, --verbose-logs** | Enables verbose logging for winget. | +| **--nowarn, --ignore-warnings** | Suppresses warning outputs. | +| **--disable-interactivity** | Disable interactive prompts. | +| **--proxy** | Set a proxy to use for this execution. | +| **--no-proxy** | Disable the use of proxy for this execution. | + +## Related topics + +* [Use the winget tool to install and manage applications](index.md) +* [uninstall command](uninstall.md) diff --git a/doc/windows/package-manager/winget/search.md b/doc/windows/package-manager/winget/search.md index 8f38a20605..59fad1847b 100644 --- a/doc/windows/package-manager/winget/search.md +++ b/doc/windows/package-manager/winget/search.md @@ -1,7 +1,7 @@ --- title: search Command -description: Queries the sources for available applications that can be installed -ms.date: 04/28/2020 +description: Queries the sources for available applications that can be installed. +ms.date: 2026-08-06 ms.topic: overview ms.localizationpriority: medium --- @@ -10,7 +10,7 @@ ms.localizationpriority: medium The **search** command of the [winget](index.md) tool queries the sources for available applications that can be installed. -The **search** command can show all applications available, or it can be filtered down to a specific application. The **search** command is used typically to identify the string to use to install a specific application. +The **search** command can show all applications available, or it can be filtered down to a specific application. The **search** command is typically used to identify the string to use to install a specific application. ## Usage @@ -25,52 +25,41 @@ The following command aliases are available: \ The following arguments are available. -| Argument | Description | - --------------|-------------| -| **-q, --query** | The query used to search for an app. | +| Argument | Description | +|--------------|-------------| +| **-q, --query** | The query used to search for a package. | ## Show all If the search command includes no filters or options, it will display all available applications in the default source. You can also search for all applications in another source if you pass in just the **source** option. -## Search strings +## Options -Search strings can be filtered with the following options. - -| Option | Description | - --------------|-------------| -| **--id** | Limits the search to the ID of the application. The ID includes the publisher and the application name. | -| **--name** | Limits the search to the name of the application. | -| **--moniker** | Limits the search to the moniker specified. | -| **--tag** | Limits the search to the tags listed for the application. | -| **--cmd, --command** | Limits the search to the commands listed for the application. | +| Option | Description | +|--------------|-------------| +| **--id** | Filter results by id. | +| **--name** | Filter results by name. | +| **--moniker** | Filter results by moniker. | +| **--tag** | Filter results by tag. | +| **--cmd, --command** | Filter results by command. | | **-s, --source** | Find package using the specified source. | -| **-n, --count** | Show no more than specified number of results (between 1 and 1000). | +| **-n, --count** | Show no more than the specified number of results (between 1 and 1000). | | **-e, --exact** | Find package using exact match. | | **--header** | Optional Windows-Package-Manager REST source HTTP header. | +| **--authentication-mode** | Specify authentication window preference (`silent`, `silentPreferred`, or `interactive`). | +| **--authentication-account** | Specify the account to be used for authentication. | | **--accept-source-agreements** | Accept all source agreements during source operations. | | **--versions** | Show available versions of the package. | -| **-?, --help** | Gets additional help on this command. | +| **-?, --help** | Shows help about the selected command. | | **--wait** | Prompts the user to press any key before exiting. | | **--logs, --open-logs** | Open the default logs location. | | **--verbose, --verbose-logs** | Enables verbose logging for winget. | +| **--nowarn, --ignore-warnings** | Suppresses warning outputs. | | **--disable-interactivity** | Disable interactive prompts. | +| **--proxy** | Set a proxy to use for this execution. | +| **--no-proxy** | Disable the use of proxy for this execution. | -The string will be treated as a substring. The search by default is also case-insensitive. For example, `winget search micro` could return the following: - -* Microsoft -* Microscope -* MyMicro - -## Search options - -The search commands supports a number of options or filters to help limit the results. - -| Option | Description | - --------------|-------------| -| **-e, --exact** | Uses the exact string in the query, including checking for case-sensitivity. It will not use the default behavior of a substring. | -| **-n, --count** | Restricts the output of the display to the specified count. | -| **-s, --source** | Restricts the search to the specified [source](source.md) name. | +The string will be treated as a substring. The search by default is also case-insensitive. For example, `winget search micro` could return results such as `Microsoft`, `Microscope`, or `MyMicro`. ## Related topics diff --git a/doc/windows/package-manager/winget/settings.md b/doc/windows/package-manager/winget/settings.md index a4fc50e16d..80352543e6 100644 --- a/doc/windows/package-manager/winget/settings.md +++ b/doc/windows/package-manager/winget/settings.md @@ -1,136 +1,76 @@ --- title: winget settings command -description: Provides customizations for the Windows Package Manager. -ms.date: 05/05/2021 +description: Opens settings or sets administrator settings for Windows Package Manager. +ms.date: 2026-08-06 ms.topic: article ms.localizationpriority: medium --- # settings command (winget) -The **settings** command of the [winget](index.md) tool allows you to customize your Windows Package Manager client experience. You can change defaults and try out experimental features that are enabled in your client. -The **settings** command will launch your default JSON editor. Windows by default will launch Notepad as an option. We recommend using a tool like [Visual Studio code](https://code.visualstudio.com/). +The **settings** command of the [winget](index.md) tool opens settings in the default JSON text editor. If no editor is configured, it opens settings in Notepad. For available settings, see [https://aka.ms/winget-settings](https://aka.ms/winget-settings). -> You can easily install Visual Studio Code, by typing `winget install Microsoft.VisualStudioCode` +This command can also be used to set administrator settings by providing the **--enable** or **--disable** arguments, or by using the **export**, **set**, and **reset** subcommands. ## Usage Launch your default JSON editing tool: `winget settings` -![Screenshot of the Windows Package Manager Settings.](images/settings.png) - -When you launch the settings for the first time, there will be no settings specified. At the top of the JSON we provide a link to [https://aka.ms/winget-settings](https://aka.ms/winget-settings) where you can discover the latest experimental features and settings. - -We have also defined a schema for the settings file. This allows you to use TAB to discover settings and syntax if your JSON editor supports JSON schemas. - -## Updating Settings - -The following settings are available for the 1.0 release of the Windows Package Manager. - -### Source - -The `source` settings involve configuration to the WinGet source. - -```json - "source": { - "autoUpdateIntervalInMinutes": 3 - }, -``` - -#### autoUpdateIntervalInMinutes - -A positive integer represents the update interval in minutes. The check for updates only happens when a source is used. A zero will disable the check for updates to a source. Any other values are invalid. - -- Disable: 0 -- Default: 5 - -To manually update the source use `winget source update` - -### Visual +Manage admin settings: `winget settings [] []` -The `visual` settings involve visual elements that are displayed by WinGet +The following command aliases are available: `config` -```json - "visual": { - "progressBar": "accent" - }, -``` - -#### progressBar - -Color of the progress bar that WinGet displays when not specified by arguments. - -- accent (default) -- retro -- rainbow - -### Install Behavior - -The `installBehavior` settings affect the default behavior of installing and upgrading (where applicable) packages. - -#### Preferences and Requirements - -Some of the settings are duplicated under `preferences` and `requirements`. `preferences` affect how the various available options are sorted when choosing the one to act on. For instance, the default scope of package installs is for the current user, but if that is not an option then a machine level installer will be chosen. `requirements` filter the options, potentially resulting in an empty list and a failure to install. In the previous example, a user scope requirement would result in no applicable installers and an error. - -Any arguments passed on the command line will effectively override the matching `requirement` setting for the duration of that command. - -#### Scope - -The `scope` behavior affects the choice between installing a package for the current user or for the entire machine. The matching parameter is `--scope`, and uses the same values (`user` or `machine`). - -```json - "installBehavior": { - "preferences": { - "scope": "user" - } - }, -``` - -#### Locale +![Screenshot of the Windows Package Manager Settings.](images/settings.png) -The `locale` behavior affects the choice of installer based on installer locale. The matching parameter is `--locale`, and uses bcp47 language tag. +## Sub-commands -```json - "installBehavior": { - "preferences": { - "locale": [ "en-US", "fr-FR" ] - } - }, -``` +| Sub-command | Description | +|-------------|-------------| +| **export** | Export settings as JSON. | +| **set** | Sets the value of an admin setting. | +| **reset** | Resets an admin setting to its default value. | -### Telemetry +## Options -The `telemetry` settings control whether winget writes ETW events that may be sent to Microsoft on a default installation of Windows. +| Option | Description | +|--------|-------------| +| **--enable** | Enables the specific administrator setting. | +| **--disable** | Disables the specific administrator setting. | +| **-?, --help** | Shows help about the selected command. | +| **--wait** | Prompts the user to press any key before exiting. | +| **--logs, --open-logs** | Open the default logs location. | +| **--verbose, --verbose-logs** | Enables verbose logging for winget. | +| **--nowarn, --ignore-warnings** | Suppresses warning outputs. | +| **--disable-interactivity** | Disable interactive prompts. | +| **--proxy** | Set a proxy to use for this execution. | +| **--no-proxy** | Disable the use of proxy for this execution. | -See [details on telemetry](https://github.com/microsoft/winget-cli/blob/master/README.md#datatelemetry), and our [primary privacy statement](https://github.com/microsoft/winget-cli/blob/master/PRIVACY.md). +## Sub-command details -#### disable +### export -```json - "telemetry": { - "disable": true - }, -``` +Usage: `winget settings export []` -If set to true, the `telemetry.disable` setting will prevent any event from being written by the program. +Exports settings as JSON. -### Network +### set -The `network` settings influence how winget uses the network to retrieve packages and metadata. +Usage: `winget settings set [--setting] [--value] []` -#### Downloader +| Argument | Description | +|--------|-------------| +| **--setting** | Name of the setting to modify. | +| **--value** | Value to set for the setting. | -The `downloader` setting controls which code is used when downloading packages. The default is `default`, which may be any of the options based on our determination. -`wininet` uses the [WinINet](https://docs.microsoft.com/windows/win32/wininet/about-wininet) APIs, while `do` uses the -[Delivery Optimization](https://support.microsoft.com/windows/delivery-optimization-in-windows-10-0656e53c-15f2-90de-a87a-a2172c94cf6d) service. +### reset -```json - "network": { - "downloader": "do" - } -``` +Usage: `winget settings reset [[--setting] ] []` -## Enabling Experimental features +| Argument or option | Description | +|--------|-------------| +| **--setting** | Name of the setting to modify. | +| **-r, --recurse, --all** | Resets all admin settings. | -To discover which experimental features are available, go to [https://aka.ms/winget-settings](https://aka.ms/winget-settings) where you can see the experimental features available to you. +## Related topics +* [Use the winget tool to install and manage applications](index.md) diff --git a/doc/windows/package-manager/winget/show.md b/doc/windows/package-manager/winget/show.md index acb24bd5e9..2dd01e7f89 100644 --- a/doc/windows/package-manager/winget/show.md +++ b/doc/windows/package-manager/winget/show.md @@ -1,7 +1,7 @@ --- title: show Command -description: Displays details for the specified application, including details on the source of the application as well as the metadata associated with the application. -ms.date: 04/28/2020 +description: Displays details for the specified application, including source and package metadata. +ms.date: 2026-08-06 ms.topic: overview ms.localizationpriority: medium --- @@ -27,7 +27,7 @@ The following arguments are available. | Argument | Description | |--------------|-------------| -| **-q, --query** | The query used to search for an application. | +| **-q, --query** | The query used to search for a package. | ## Options @@ -35,25 +35,30 @@ The following options are available. | Option | Description | |--------------|-------------| -| **-m,--manifest** | The path to the manifest of the application to install. | -| **--id** | Filter results by ID. | -| **--name** | Filter results by name. | -| **--moniker** | Filter results by application moniker. | -| **-v,--version** | Use the specified version. The default is the latest version. | -| **-s,--source** | Find the application using the specified [source](source.md). | -| **-e,--exact** | Find the application using exact match. | -| **--versions** | Show available versions of the application. | +| **-m, --manifest** | The path to the manifest of the package. | +| **--id** | Filter results by id. | +| **--name** | Filter results by name. | +| **--moniker** | Filter results by moniker. | +| **-v, --version** | Use the specified version; default is the latest version. | +| **-s, --source** | Find package using the specified source. | +| **-e, --exact** | Find package using exact match. | | **--scope** | Select install scope (user or machine). | | **-a, --architecture** | Select the architecture. | | **--installer-type** | Select the installer type. | | **--locale** | Locale to use (BCP47 format). | +| **--versions** | Show available versions of the package. | | **--header** | Optional Windows-Package-Manager REST source HTTP header. | +| **--authentication-mode** | Specify authentication window preference (`silent`, `silentPreferred`, or `interactive`). | +| **--authentication-account** | Specify the account to be used for authentication. | | **--accept-source-agreements** | Accept all source agreements during source operations. | -| **-?, --help** | Gets additional help on this command. | +| **-?, --help** | Shows help about the selected command. | | **--wait** | Prompts the user to press any key before exiting. | | **--logs, --open-logs** | Open the default logs location. | | **--verbose, --verbose-logs** | Enables verbose logging for winget. | +| **--nowarn, --ignore-warnings** | Suppresses warning outputs. | | **--disable-interactivity** | Disable interactive prompts. | +| **--proxy** | Set a proxy to use for this execution. | +| **--no-proxy** | Disable the use of proxy for this execution. | ## Multiple selections @@ -80,8 +85,8 @@ If a single application is detected, the following data will be displayed. | Value | Description | |--------------|-------------| | **Type** | The type of installer. | -| **Download Url** | The Url of the installer. | -| **SHA256** | The Sha-256 of the installer. | +| **Download Url** | The URL of the installer. | +| **SHA256** | The SHA-256 of the installer. | ## Related topics diff --git a/doc/windows/package-manager/winget/source.md b/doc/windows/package-manager/winget/source.md index 6f87ba5e36..65719c3cb6 100644 --- a/doc/windows/package-manager/winget/source.md +++ b/doc/windows/package-manager/winget/source.md @@ -1,16 +1,14 @@ --- title: source Command description: Manages the repositories accessed by Windows Package Manager. -ms.date: 04/28/2020 +ms.date: 2026-08-06 ms.topic: overview ms.localizationpriority: medium --- # source command (winget) -> The **source** command is currently for internal use only. Additional sources are not supported at this time. - -The **source** command of the [winget](index.md) tool manages the repositories accessed by Windows Package Manager. With the **source** command you can **add**, **remove**, **list**, and **update** the repositories. +The **source** command of the [winget](index.md) tool manages the repositories accessed by Windows Package Manager. With the **source** command you can add, remove, list, update, edit, reset, and export sources. A source provides the data for you to discover and install applications. Only add a new source if you trust it as a secure location. @@ -20,26 +18,19 @@ A source provides the data for you to discover and install applications. Only ad ![Source image](images/source.png) -## Arguments - -The following arguments are available. - -| Argument | Description | -|--------------|-------------| -| **-?, --help** | Gets additional help on this command. | - ## Sub-commands -Source supports the following sub-commands for manipulating the sources. +Source supports the following sub-commands for manipulating sources. -| Sub-command | Description | +| Sub-command | Description | |--------------|-------------| -| **add** | Adds a new source. | -| **list** | Enumerates the list of enabled sources. | -| **update** | Updates a source. | -| **remove** | Removes a source. | -| **reset** | Resets **winget** back to the initial configuration. | -| **export** | Export current sources | +| **add** | Add a new source. | +| **list** | List current sources. | +| **update** | Update current sources. | +| **remove** | Remove current sources. | +| **edit** | Edit properties of a source. | +| **reset** | Reset sources. | +| **export** | Export current sources. | For more details on a specific command, pass it the help argument. [-?] @@ -47,87 +38,91 @@ For more details on a specific command, pass it the help argument. [-?] The **source** command supports the following options. -| Option | Description | +| Option | Description | |--------------|-------------| -| **-n, --name** | The name to identify the source by. | -| **-a, --arg** | The URL or UNC of the source. | -| **-t, --type** | The type of source. | -| **-?, --help** | Gets additional help on this command. | +| **-?, --help** | Shows help about the selected command. | | **--wait** | Prompts the user to press any key before exiting. | | **--logs, --open-logs** | Open the default logs location. | | **--verbose, --verbose-logs** | Enables verbose logging for winget. | +| **--nowarn, --ignore-warnings** | Suppresses warning outputs. | | **--disable-interactivity** | Disable interactive prompts. | +| **--proxy** | Set a proxy to use for this execution. | +| **--no-proxy** | Disable the use of proxy for this execution. | ## add -The **add** sub-command adds a new source. This sub-command requires the **--name** option and the **name** argument. +The **add** sub-command adds a new source. -Usage: `winget source add [-n, --name] [-a] [[-t] ]` +Usage: `winget source add [-n] [-a] [[-t] ] []` -Example: `winget source add --name Contoso https://www.contoso.com/cache` - -The **add** sub-command also supports the optional **type** parameter. The **type** parameter communicates to the client what type of repository it is connecting to. The following types are supported. - -| Type | Description | +| Argument or option | Description | |--------------|-------------| -| **Microsoft.PreIndexed.Package** | The type of source \. | -| **Microsoft.Rest** | A Microsoft REST API source. | +| **-n, --name** | Name of the source. | +| **-a, --arg** | Argument given to the source. | +| **-t, --type** | Type of the source. | +| **--trust-level** | Trust level of the source (`none` or `trusted`). | +| **--header** | Optional Windows-Package-Manager REST source HTTP header. | +| **--accept-source-agreements** | Accept all source agreements during source operations. | +| **--explicit** | Excludes a source from discovery unless specified. | -## list +Example: `winget source add --name Contoso --arg https://www.contoso.com/cache` -the **list** sub-command enumerates the currently enabled sources. This sub-command also provides details on a specific source. +## list -Usage: `winget source list [-n, --name] ` +The **list** sub-command lists all current sources, or full details of a specific source. -### list all +Usage: `winget source list [[-n] ] []` -The **list** sub-command by itself will reveal the complete list of supported sources. For example: +The following command aliases are available: `ls` -![Source list image](images/source-list.png) +## update -### list source details +The **update** sub-command updates all sources, or only a specific source. -In order to get complete details on the source, pass in the name used to identify the source. For example: +Usage: `winget source update [[-n] ] []` -![Source list winget image](images/source-list-winget.png) +The following command aliases are available: `refresh` -**Name** displays the name to identify the source by. -**Type** displays the type of repo. -**Arg** displays the URL or path used by the source. -**Data** displays the optional package name used if appropriate. -**Updated** displays the last date and time the source was updated. +## remove -## update +The **remove** sub-command removes a specific source. -The **update** sub-command forces an update to an individual source or for all. +Usage: `winget source remove [-n] []` -usage: `winget source update [-n, --name] ` +The following command aliases are available: `rm` -### update all +## edit -The **update** sub-command by itself will request and update to each repo. For example: `C:\winget update` +The **edit** sub-command edits properties of an existing source. -### update source +Usage: `winget source edit [-n] []` -The **update** sub-command combined with the **--name** option can direct and update to an individual source. For example: `C:\winget source update --name winget` +The following command aliases are available: `config`, `set` -## remove +| Option | Description | +|--------------|-------------| +| **-e, --explicit** | Excludes a source from discovery (`true` or `false`). | -The **remove** sub-command removes a source. This sub-command requires the **--name** option and **name argument** in order to identify the source. +## reset -Usage: `winget source remove [-n, --name] ` +The **reset** sub-command drops existing sources. Without any argument, it drops all sources and adds the defaults. If a named source is provided, only that source is dropped. -For example: `winget source remove --name Contoso` +Usage: `winget source reset [[-n] ] []` -## reset +| Argument or option | Description | +|--------------|-------------| +| **-n, --name** | Name of the source. | +| **--force** | Forces the reset of the sources. | -The **reset** sub-command resets the client back to its original configuration. The **reset** sub-command removes all sources and sets the source to the default. This sub-command should only be used in rare cases. +## export -Usage: `winget source reset` +The **export** sub-command exports current sources as JSON for Group Policy. -## Default repository +Usage: `winget source export [[-n] ] []` -Windows Package Manager specifies a default repository. You can identify the repository by using the **list** command. For example: `winget source list` +| Argument | Description | +|--------------|-------------| +| **-n, --name** | Name of the source. | ## Related topics diff --git a/doc/windows/package-manager/winget/uninstall.md b/doc/windows/package-manager/winget/uninstall.md index 8f42bbc567..fc5d0bf6b5 100644 --- a/doc/windows/package-manager/winget/uninstall.md +++ b/doc/windows/package-manager/winget/uninstall.md @@ -1,7 +1,7 @@ --- title: uninstall Command -description: uninstalls the specified application. -ms.date: 05/05/2021 +description: Uninstalls the specified application. +ms.date: 2026-08-06 ms.topic: overview ms.localizationpriority: medium --- @@ -28,7 +28,7 @@ The following arguments are available. | Argument | Description | |-------------|-------------| -| **-q,--query** | The query used to search for an app. | +| **-q, --query** | The query used to search for a package. | ## Options @@ -36,33 +36,34 @@ The options allow you to customize the uninstall experience to meet your needs. | Option | Description | |--------|-------------| -| **-m, --manifest** | Must be followed by the path to the manifest (YAML) file. You can use the manifest to run the uninstall experience from a [local YAML file](#local-uninstall). | -| **--id** | Limits the uninstall to the ID of the application. | -| **--name** | Limits the search to the name of the application. | -| **--moniker** | Limits the search to the moniker listed for the application. | -| **-v, --version** | Enables you to specify an exact version to uninstall. If not specified, the latest will uninstall the highest versioned application. | -| **-s, --source** | Restricts the search to the source name provided. Must be followed by the source name. | -| **-e, --exact** | Uses the exact string in the query, including checking for case-sensitivity. It will not use the default behavior of a substring. | -| **-i, --interactive** | Runs the uninstaller in interactive mode. The default experience shows uninstaller progress. | -| **-h, --silent** | Runs the uninstaller in silent mode. This suppresses all UI. The default experience shows uninstaller progress. | -| **-o, --log** | Directs the logging to a log file. You must provide a path to a file that you have the write rights to. | +| **-m, --manifest** | The path to the manifest of the package. | +| **--id** | Filter results by id. | +| **--name** | Filter results by name. | +| **--moniker** | Filter results by moniker. | | **--product-code** | Filters using the product code. | +| **-v, --version** | The version to act upon. | +| **--all, --all-versions** | Uninstall all versions. | +| **-s, --source** | Find package using the specified source. | +| **-e, --exact** | Find package using exact match. | | **--scope** | Select installed package scope filter (user or machine). | -| **--force** | Directly run the command and continue with non-security-related issues. | +| **-i, --interactive** | Request interactive installation; user input may be needed. | +| **-h, --silent** | Request silent installation. | +| **--force** | Direct run the command and continue with non security related issues. | | **--purge** | Deletes all files and directories in the package directory (portable). | | **--preserve** | Retains all files and directories created by the package (portable). | +| **-o, --log** | Log location (if supported). | | **--header** | Optional Windows-Package-Manager REST source HTTP header. | +| **--authentication-mode** | Specify authentication window preference (`silent`, `silentPreferred`, or `interactive`). | +| **--authentication-account** | Specify the account to be used for authentication. | | **--accept-source-agreements** | Accept all source agreements during source operations. | -| **-?, --help** | Get additional help on this command. | +| **-?, --help** | Shows help about the selected command. | | **--wait** | Prompts the user to press any key before exiting. | | **--logs, --open-logs** | Open the default logs location. | | **--verbose, --verbose-logs** | Enables verbose logging for winget. | +| **--nowarn, --ignore-warnings** | Suppresses warning outputs. | | **--disable-interactivity** | Disable interactive prompts. | - -Once you have successfully identified the application intended to uninstall, winget will execute the uninstall command. In the example below, the **name** 'orca' and the **id** was passed in. - -![uninstall command](images/uninstall-execute.png) - +| **--proxy** | Set a proxy to use for this execution. | +| **--no-proxy** | Disable the use of proxy for this execution. | ### Example queries @@ -75,7 +76,7 @@ winget uninstall --name powertoys --version 0.15.2 The following example uninstalls an application using its ID. ```CMD -winget uninstall --id "{24559D0F-481C-F3BE-8DD0-D908923A38F8}" +winget uninstall --id Microsoft.PowerToys ``` ## Multiple selections @@ -85,11 +86,8 @@ If the query provided to **winget** does not result in a single application to u ![uninstall command](images/uninstall-multiple.png) ## Uninstalling apps not installed with Windows Package Manager -As mentioned in [**list**](list.md), the **winget list** command will display more than just apps installed with the **winget**. Therefore you can use these commands to quickly and easily remove apps from your PC. - -In this example, **list** was used to find the application, and then the **id** was passed in as part of uninstall. -![uninstall with list command](images/uninstall-with-list.png) +As mentioned in [**list**](list.md), the **winget list** command displays more than just apps installed with **winget**. Therefore, you can use these commands to quickly remove apps from your PC. ## Related topics diff --git a/doc/windows/package-manager/winget/upgrade.md b/doc/windows/package-manager/winget/upgrade.md index 8da795446b..f112552ae8 100644 --- a/doc/windows/package-manager/winget/upgrade.md +++ b/doc/windows/package-manager/winget/upgrade.md @@ -1,16 +1,16 @@ --- title: upgrade Command -description: upgrades the specified application. -ms.date: 05/05/2021 +description: Upgrades the specified application. +ms.date: 2026-08-06 ms.topic: overview ms.localizationpriority: medium --- # upgrade command (winget) -The **upgrade** command of the [winget](index.md) tool upgrades the specified application. Optionally, you may not specify an application, this will list all available upgrades instead. +The **upgrade** command of the [winget](index.md) tool upgrades the specified application. When no arguments are given, it shows the packages that have upgrades available. -The **upgrade** command requires that you specify the exact string to upgrade. If there is any ambiguity, you will be prompted to further filter the **upgrade** command to an exact application. +The **upgrade** command requires that you specify the exact string to upgrade. If there is any ambiguity, you will be prompted to further filter the **upgrade** command to an exact application. ## Usage @@ -21,50 +21,64 @@ The following command aliases are available: \ ![upgrade command](images/upgrade.png) +## Arguments + +The following arguments are available. + +| Argument | Description | +|-------------|-------------| +| **-q, --query** | The query used to search for a package. | + ## Options The options allow you to customize the upgrade experience to meet your needs. -| Option | Description | -|-----------------------------------|------------------------------------------------------------------------------------------------------------------------------| -| **-m, --manifest** | Must be followed by the path to the manifest (YAML) file. You can use the manifest to run the upgrade experience from a [local YAML file](#local-upgrade). | -| **--id** | Limits the upgrade to the ID of the application. | -| **--name** | Limits the search to the name of the application. | -| **--moniker** | Limits the search to the moniker listed for the application. | -| **-v, --version** | Enables you to specify an exact version to upgrade. If not specified, the latest will upgrade the highest versioned application. | -| **-s, --source** | Restricts the search to the source name provided. Must be followed by the source name. | -| **-e, --exact** | Uses the exact string in the query, including checking for case-sensitivity. It will not use the default behavior of a substring. | -| **-i, --interactive** | Runs the installer in interactive mode. The default experience shows installer progress. | -| **-h, --silent** | Runs the installer in silent mode. This suppresses all UI. The default experience shows installer progress. | -| **-o, --log** | Directs the logging to a log file. You must provide a path to a file that you have the write rights to. | -| **--override** | A string that will be passed directly to the installer. | -| **-l, --location** | Location to upgrade to (if supported). | -| **--force** | When a hash mismatch is discovered will ignore the error and attempt to install the package. | -| **--all** | Updates all available packages to the latest application. | -| **--include-unknown** | Attempt to upgrade a package even if the package's current version is unknown. | -| **--purge** | Deletes all files and directories in the package directory (portable). | -| **--custom** | Arguments to be passed on to the installer in addition to the defaults. | -| **--scope** | Select installed package scope filter (user or machine). | -| **-a, --architecture** | Select the architecture to install. | -| **--locale** | Locale to use (BCP47 format). | -| **--ignore-security-hash** | Ignore the installer hash check failure. | -| **--ignore-local-archive-malware-scan** | Ignore the malware scan performed as part of installing an archive-type package from a local manifest. | -| **--accept-package-agreements** | Accept all license agreements for packages. | -| **--accept-source-agreements** | Accept all source agreements during source operations. | -| **--header** | Optional Windows-Package-Manager REST source HTTP header. | -| **-r, --recurse, --all** | Upgrade all installed packages to the latest version if available. | -| **--pinned,--include-pinned** | Upgrade packages even if they have a non-blocking pin. | -| **--uninstall-previous** | Uninstall the previous version of the package during the upgrade. | -| **--wait** | Prompts the user to press any key before exiting. | -| **--logs,--open-logs** | Open the default logs location. | -| **--verbose,--verbose-logs** | Enable verbose logging for winget. | -| **--disable-interactivity** | Disable interactive prompts. | -| **--installer-type** | Select the installer type -| **--skip-dependencies** | Skips processing package dependencies and Windows features | +| Option | Description | +|-------------|-------------| +| **-m, --manifest** | The path to the manifest of the package. You can use the manifest to run the upgrade experience from a local YAML file. | +| **--id** | Filter results by id. | +| **--name** | Filter results by name. | +| **--moniker** | Filter results by moniker. | +| **-v, --version** | Use the specified version; default is the latest version. | +| **-s, --source** | Find package using the specified source. | +| **-e, --exact** | Find package using exact match. | +| **-i, --interactive** | Request interactive installation; user input may be needed. | +| **-h, --silent** | Request silent installation. | +| **--purge** | Deletes all files and directories in the package directory (portable). | +| **-o, --log** | Log location (if supported). | +| **--custom** | Arguments to be passed on to the installer in addition to the defaults. | +| **--override** | Override arguments to be passed on to the installer. | +| **-l, --location** | Location to install to (if supported). | +| **--scope** | Select installed package scope filter (user or machine). | +| **-a, --architecture** | Select the architecture. | +| **--installer-type** | Select the installer type. | +| **--locale** | Locale to use (BCP47 format). | +| **--ignore-security-hash** | Ignore the installer hash check failure. | +| **--allow-reboot** | Allows a reboot if applicable. | +| **--skip-dependencies** | Skips processing package dependencies and Windows features. | +| **--ignore-local-archive-malware-scan** | Ignore the malware scan performed as part of installing an archive type package from local manifest. | +| **--accept-package-agreements** | Accept all license agreements for packages. | +| **--accept-source-agreements** | Accept all source agreements during source operations. | +| **--header** | Optional Windows-Package-Manager REST source HTTP header. | +| **--authentication-mode** | Specify authentication window preference (`silent`, `silentPreferred`, or `interactive`). | +| **--authentication-account** | Specify the account to be used for authentication. | +| **-r, --recurse, --all** | Upgrade all installed packages to latest if available. | +| **-u, --unknown, --include-unknown** | Upgrade packages even if their current version cannot be determined. | +| **--pinned, --include-pinned** | Upgrade packages even if they have a non-blocking pin. | +| **--uninstall-previous** | Uninstall the previous version of the package during upgrade. | +| **--force** | Direct run the command and continue with non security related issues. | +| **-?, --help** | Shows help about the selected command. | +| **--wait** | Prompts the user to press any key before exiting. | +| **--logs, --open-logs** | Open the default logs location. | +| **--verbose, --verbose-logs** | Enables verbose logging for winget. | +| **--nowarn, --ignore-warnings** | Suppresses warning outputs. | +| **--disable-interactivity** | Disable interactive prompts. | +| **--proxy** | Set a proxy to use for this execution. | +| **--no-proxy** | Disable the use of proxy for this execution. | ### Example queries -The following example upgrades a specific version of an application. +The following example upgrades a specific application to a specific version. ```CMD winget upgrade powertoys --version 0.15.2 @@ -76,7 +90,7 @@ The following example upgrades an application from its ID. winget upgrade --id Microsoft.PowerToys ``` -The following example shows upgrading all apps +The following example upgrades all installed packages with upgrades available. ```CMD winget upgrade --all @@ -92,7 +106,7 @@ In the example below you will see [**list**](list.md) identifies that an update ## **upgrade** --all -**upgrade --all** will identify all the applications with upgrades available. When you run **winget upgrade --all** the Windows Package Manager will look for all applications that have updates available and attempt to install the upgrade. +**winget upgrade --all** identifies all the applications with upgrades available and attempts to install the upgrades. ## Related topics diff --git a/doc/windows/package-manager/winget/validate.md b/doc/windows/package-manager/winget/validate.md index b062ebf05a..69f56b83b9 100644 --- a/doc/windows/package-manager/winget/validate.md +++ b/doc/windows/package-manager/winget/validate.md @@ -1,14 +1,14 @@ --- title: winget validate Command -description: Validates a manifest file for submitting software to the Microsoft Community Package Manifest Repository on GitHub. -ms.date: 04/28/2020 +description: Validates a manifest file. +ms.date: 2026-08-06 ms.topic: article ms.localizationpriority: medium --- # validate command (winget) -The **validate** command of the [winget](index.md) tool validates a [manifest](../package/manifest.md) for submitting software to the **Microsoft Community Package Manifest Repository** on GitHub. The manifest must be a YAML file that follows the [specification](https://github.com/microsoft/winget-pkgs/blob/master/doc/manifest/README.md). +The **validate** command of the [winget](index.md) tool validates a [manifest](../package/manifest.md) using a strict set of guidelines. This is intended to enable you to check your manifest before submitting it to a repository. ## Usage @@ -18,21 +18,24 @@ The **validate** command of the [winget](index.md) tool validates a [manifest](. The following arguments are available. -| Argument | Description | +| Argument | Description | |--------------|-------------| -| **--manifest** | The path to the manifest to be validated. | +| **--manifest** | The path to the manifest to be validated. | ## Options -The options allow you to customize the export experience to meet your needs. +The following options are available. | Option | Description | |--------|-------------| -| **-?, --help** | Get additional help on this command. | +| **-?, --help** | Shows help about the selected command. | | **--wait** | Prompts the user to press any key before exiting. | | **--logs, --open-logs** | Open the default logs location. | | **--verbose, --verbose-logs** | Enables verbose logging for winget. | +| **--nowarn, --ignore-warnings** | Suppresses warning outputs. | | **--disable-interactivity** | Disable interactive prompts. | +| **--proxy** | Set a proxy to use for this execution. | +| **--no-proxy** | Disable the use of proxy for this execution. | ## Related topics