Upgrade command (winget) [ Windows ]

Upgrade command (winget) [ Windows ]

In this article

  1. Aliases

  2. Usage

  3. Arguments

  4. Options

The upgrade command of the winget tool upgrades the specified application. Optionally, you may use the list command to identify the application you want to upgrade.

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 following aliases are available for this command:

  • update


winget upgrade [[-q] \<query> ...] [\<options>]

Image of upgrade command arguments


The following arguments are available.

-q,--queryThe query used to search for an app.


The query argument is positional. Wild-card style syntax is not supported. This is most often the string of characters you expect to help find the package you are upgrading.


The options allow you to customize the upgrade experience to meet your needs.

-m, --manifestMust 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.
--idLimits the upgrade to the ID of the application.
--nameLimits the search to the name of the application.
--monikerLimits the search to the moniker listed for the application.
-v, --versionEnables you to specify an exact version to upgrade. If not specified, the latest will upgrade the highest versioned application.
-s, --sourceRestricts the search to the source name provided. Must be followed by the source name.
-e, --exactUses the exact string in the query, including checking for case sensitivity. It will not use the default behaviour of a substring.
-i, --interactiveRuns the installer in interactive mode. The default experience shows installer progress.
-h, --silentRuns the installer in silent mode. This suppresses all UI. The default experience shows installer progress.
--purgeDeletes all files and directories in the package directory (portable)
-o, --logDirects the logging to a log file. You must provide a path to a file that you have the write rights to.
--customArguments to be passed on to the installer in addition to the defaults.
--overrideA string that will be passed directly to the installer.
-l, --locationLocation to upgrade to (if supported).
-scopeSelect the installed package scope filter (user or machine).
a, --architectureSelect the architecture to install.
--installer-typeSelect the installer type to upgrade. See supported installer types for WinGet client.
--localeSpecifies which locale to use (BCP47 format).
--ignore-security-hashIgnore the installer hash check failure. Not recommended.
--ignore-local-archive-malware-scanIgnore the malware scan performed as part of installing an archive-type package from the local manifest.
--accept-package-agreementsUsed to accept the license agreement, and avoid the prompt.
--accept-source-agreementsUsed to accept the source license agreement, and avoid the prompt.
--headerOptional Windows-Package-Manager REST source HTTP header.
-r, --recurse, --allUpdates all available packages to the latest application.
-u, --unknown, --include-unknownUpgrade packages even if their current version cannot be determined.
--pinned,--include-pinnedUpgrade packages even if they have a non-blocking pin.
--uninstall-previousUninstall the previous version of the package during the upgrade.
--forceDirect run the command and continue with non-security related issues.
-?,--helpShows help about the selected command.
--waitPrompts the user to press any key before exiting.
--logs,--open-logsOpen the default logs location.
--verbose, --verbose-logsUsed to override the logging setting and create a verbose log.
--disable-interactivityDisable interactive prompts.

Example queries

The following example upgrades a specific version of an application.


winget upgrade powertoys --version 0.15.2

The following example upgrades an application from its ID.


winget upgrade --id Microsoft.PowerToys

The following example shows upgrading all apps

CMD Copy

winget upgrade --all

Using upgrade

To identify which apps are in need of an update, simply use upgrade without any arguments to show all available upgrades.

In the example below, you will see winget upgrade shows the user which apps have an available update. From the available updates, the user identifies that an update is available for JanDeDobbeleer.OhMyPosh and uses an upgrade to update the application.

Animation demonstrating upgrade command

Using a list and upgrade

To search for an available update for a specific app, use to the list command. Once you have identified that an update is available for your specific app, use an upgrade to install the latest.

The example below shows the list command being used to identify that an update is available for Microsoft.WindowsTerminalPreview. The user then uses an upgrade to update the application.

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 updates.


Some applications do not provide a version. They are always the latest. Because the Windows Package Manager cannot identify if there is a newer version of the app, an upgrade will not be possible.

Did you find this article valuable?

Support VISHAL MATHUR by becoming a sponsor. Any amount is appreciated!