Skip to main content
The upgrade command updates installed packages to their latest available versions. You can also use the update alias.

Syntax

winget upgrade [<query>...] [options]

Arguments

query
string
Search query to find packages to upgrade. If omitted, lists all available upgrades.

Package Selection Options

--id
string
Filter by package identifier
--name
string
Filter by package name
--moniker
string
Filter by package moniker
-m, --manifest
path
Path to manifest file with upgrade version
-v, --version
string
Upgrade to specific version
-s, --source
string
Source to check for upgrades
-e, --exact
flag
Use exact string matching for queries
-r, --all
flag
Upgrade all packages with available updates
-u, --include-unknown
flag
Include packages with unknown versions in upgrade list
--include-pinned
flag
Include pinned packages in upgrade list (won’t upgrade unless —force)
--scope
string
Installation scope filter: user or machine
-a, --architecture
string
Select installer architecture: x86, x64, arm, arm64
--installer-type
string
Select installer type
--locale
string
Locale to use (BCP-47 format)

Upgrade Behavior

-i, --interactive
flag
Run installer in interactive mode
-h, --silent
flag
Run installer in silent mode
--purge
flag
Purge previous version data when upgrading
-o, --log
path
Path to write installer log file
-l, --location
path
Installation directory (if supported)
--override
string
Override installer arguments
--custom
string
Additional arguments to pass to installer
--force
flag
Force upgrade, bypassing pinned packages and hash validation
--ignore-security-hash
flag
Ignore installer hash validation
--ignore-local-archive-malware-scan
flag
Skip malware scan for local archives
--accept-package-agreements
flag
Accept all license agreements
--accept-source-agreements
flag
Accept all source agreements
--uninstall-previous
flag
Uninstall previous version before installing new version
--allow-reboot
flag
Allow installer to request a reboot

Dependencies

--skip-dependencies
flag
Skip dependency installation

Authentication

--header
string
Custom HTTP header for source requests
--authentication-mode
string
Authentication mode: silent, silentPreferred, interactive
--authentication-account
string
Account to use for authentication

Examples

List all available upgrades:
winget upgrade
Upgrade a specific package:
winget upgrade Microsoft.PowerToys
Upgrade all packages:
winget upgrade --all
Upgrade including unknown versions:
winget upgrade --all --include-unknown
Upgrade with silent installation:
winget upgrade Microsoft.PowerToys --silent
Upgrade to specific version:
winget upgrade Microsoft.PowerToys --version 0.71.0
Upgrade accepting all agreements:
winget upgrade --all --accept-package-agreements --accept-source-agreements
Force upgrade pinned package:
winget upgrade Microsoft.PowerToys --force

Exit Codes

  • 0 - Success
  • 0x8A150001 - Package not found
  • 0x8A150002 - No applicable upgrade
  • 0x8A150011 - User cancelled
  • 0x8A15002C - Package is pinned
Without arguments, winget upgrade lists all packages with available updates but doesn’t install them. Use --all to upgrade everything.
Pinned packages are excluded from upgrades by default. Use --force to upgrade pinned packages.

Build docs developers (and LLMs) love