Complete Guide to the winget upgrade
Command
![]() |
Winget Upgrade Command |
Aliases for the winget upgrade
Command
The following aliases are available:
update
: Can be used interchangeably withupgrade
.
Command Syntax
winget upgrade [[-q] <query> ...] [<options>]
![]() |
Winget Upgrade Command |
Arguments
-q, --query
: Specifies the query string to search for an application to upgrade. Note: Wildcard syntax is not supported. Use exact text to match the package you intend to upgrade.
Options for Customization
Manifest and Identification
-m, --manifest
: Provide the path to a local YAML file containing the package manifest.--id
: Limit the upgrade to a specific application ID.--name
: Restrict the search by application name.--moniker
: Limit the search to a specific moniker for the application.
Upgrade Versions
-v, --version
: Specify the version to upgrade. Defaults to the latest available version.
Upgrade Scope
-r, --recurse, --all
: Upgrade all installed applications.--uninstall-previous
: Uninstall the previous version before installing the new one.
Installer Behavior
-i, --interactive
: Launch the installer in interactive mode.-h, --silent
: Run the installer silently, suppressing all UI.--force
: Ignore minor issues and proceed with the upgrade.--allow-reboot
: Permit automatic reboots if required.
Logging and Debugging
-o, --log
: Save logs to a specified file.--logs, --open-logs
: Open the default log location.--verbose
: Generate detailed logs for debugging purposes.
Additional Configuration
--locale
: Specify the locale (in BCP47 format) for the upgrade process.--skip-dependencies
: Bypass dependency checks during the upgrade.--ignore-security-hash
: Ignore hash verification failures (not recommended).
Examples of Usage
Upgrade a Specific Version
winget upgrade powertoys --version 0.15.2
Upgrade by ID
winget upgrade --id Microsoft.PowerToys
Upgrade All Applications
winget upgrade --all
Use list
to Identify Updates
winget list
After identifying the application, run:
winget upgrade <app-name>
Special Notes on Upgrade Behavior
- Applications Without Versions: Some applications do not provide version information and are always considered the latest. These cannot be upgraded automatically.
- Side-by-Side Installation: Certain installers support side-by-side installation of multiple versions. The behavior depends on the package manifest and the inclusion of the
uninstallPrevious
setting. - Default Behavior Without
--uninstall-previous
: If--uninstall-previous
is not specified, the installer follows its default protocol.
Practical Scenarios
Using upgrade --all
Identify all applications with available updates and install them:
winget upgrade --all
Using upgrade --uninstall-previous
Remove older versions before upgrading:
winget upgrade --uninstall-previous
Using Custom Install Commands
Add installer-specific parameters:
winget upgrade --custom "/silent /norestart"