Verified June 2026 · tested with winget 1.9 on Windows 11 24H2, Windows 10 22H2 & Server 2022/2025
Quick Reference: Essential Commands
Need to manage an app right now? Here are the most common commands:
# Find a package and its ID
winget search firefox
# Install an exact package by ID
winget install -e --id Mozilla.Firefox
# List installed apps that have an update available
winget upgrade
# Upgrade everything, unattended
winget upgrade --all --silent --accept-source-agreements --accept-package-agreements
# Remove an app
winget uninstall -e --id Mozilla.Firefox
# Save and restore your whole app set
winget export -o apps.json
winget import -i apps.json
Which command do you need?
- Find an app's ID →
winget search - Install an app (exact, silent, specific version) →
winget install - See what's installed / what has updates →
winget list&winget upgrade - Update everything at once →
winget upgrade --all - Remove an app →
winget uninstall - Inspect a package →
winget show - Manage sources / migrate machines →
source,export&import
Jump to the section you need below.
winget search: Find Packages
winget search queries the configured sources (by default the winget community repository and the msstore Microsoft Store) and returns matching packages with the Id you'll use for everything else.
Windows 10 1809+Windows 11Server 2022+Built in (App Installer)
winget search Option Reference
| Option | Description |
|---|---|
<query> | Free-text term matched against name, ID, moniker and tags |
--id <id> | Match against the package Id only |
--name <name> | Match against the package Name only |
--moniker <m> | Match against the short moniker (e.g. vscode) |
-e, --exact | Require an exact, case-sensitive match |
--source <name> | Search a single source (winget or msstore) |
--count <n> | Limit the number of results shown |
winget search Usage Examples
# Broad search across name, ID, moniker and tags
winget search "visual studio code"
# Find the exact ID of a known package
winget search --id Microsoft.PowerToys
# Search only the Microsoft Store source
winget search spotify --source msstore
# Narrow a noisy term to the first 10 hits
winget search node --count 10
Tip: The value in the Id column (for example
Microsoft.VisualStudioCode) is stable across versions. Always grab the ID fromwinget search, then use it with-e --idso later commands hit the exact package.
winget install: Install Packages
winget install downloads and runs a package's installer. Pair it with -e --id for a precise, repeatable install, and add --silent for unattended scripts.
Windows 10 1809+Windows 11Server 2022+Per-user & per-machine
winget install Option Reference
| Option | Description |
|---|---|
-e, --exact | Exact, case-sensitive match on ID/name (avoids ambiguous results) |
--id <id> | Install by package Id (most reliable selector) |
--name <name> | Install by package Name |
-v, --version <ver> | Install a specific version instead of the latest |
--silent, -h | Suppress the installer UI (requires silent support in the manifest) |
--interactive, -i | Force the installer's interactive UI |
--source <name> | Install from a specific source (winget or msstore) |
--scope {user|machine} | Install per-user or system-wide (where the installer supports it) |
--location <path> | Override the install directory (if the installer allows it) |
--override <args> | Pass a raw argument string straight to the installer |
--accept-package-agreements | Auto-accept the package's license (for scripts) |
--accept-source-agreements | Auto-accept source terms on first use (for scripts) |
winget install Usage Examples
# Reliable, exact install by ID
winget install -e --id Mozilla.Firefox
# Silent, fully unattended (good for scripts and imaging)
winget install -e --id Google.Chrome --silent --accept-package-agreements --accept-source-agreements
# Pin a specific version
winget install -e --id Git.Git --version 2.44.0
# Force a system-wide (per-machine) install
winget install -e --id 7zip.7zip --scope machine
# Install from the Microsoft Store source
winget install -e --id 9NCBCSZSJRSB --source msstore
Tip: A bare
winget install firefoxcan match several packages and prompt you to choose. In automation, always use-e --idso the command never stops to ask which package you meant.
winget list: Show Installed Packages
winget list enumerates everything installed on the machine — not just apps installed through winget. It cross-references each entry against winget's sources to show whether a newer version is available.
Windows 10 1809+Windows 11Server 2022+All installers, not just winget
winget list Option Reference
| Option | Description |
|---|---|
<query> | Filter the installed list by a search term |
--id <id> | Filter by package Id |
--name <name> | Filter by package Name |
-e, --exact | Require an exact match on the filter |
--source <name> | Only show packages tied to a given source |
--upgrade-available | Show only packages that have an update available |
winget list Usage Examples
# Everything installed on the machine
winget list
# Is a specific app installed, and what version?
winget list --id Microsoft.PowerToys
# Show only apps with an update waiting
winget list --upgrade-available
Note: Entries whose version winget can't determine show Unknown in the Version column. Those apps are typically managed outside winget (portable apps, custom installers) and may not be upgradeable through it.
winget upgrade: Update Packages
winget upgrade (alias winget update) with no arguments lists every installed package that has a newer version available. Add a package selector to update one app, or --all to update everything.
Windows 10 1809+Windows 11Server 2022+Alias: winget update
winget upgrade Option Reference
| Option | Description |
|---|---|
| (no args) | List packages with an available upgrade |
-e --id <id> | Upgrade one specific package |
--all, -r | Upgrade every package with an available update |
--include-unknown, -u | Also upgrade apps whose installed version is Unknown |
--include-pinned | Include pinned packages in the upgrade |
--silent, -h | Suppress installer UIs during the upgrade |
--accept-package-agreements | Auto-accept package licenses (for scripts) |
--accept-source-agreements | Auto-accept source terms (for scripts) |
winget upgrade Usage Examples
# What can be updated?
winget upgrade
# Update one app
winget upgrade -e --id Microsoft.VisualStudioCode
# Update everything, interactively
winget upgrade --all
# Update everything, fully unattended (ideal for a scheduled task)
winget upgrade --all --silent --accept-source-agreements --accept-package-agreements
# Also catch apps whose version winget couldn't detect
winget upgrade --all --include-unknown --silent --accept-source-agreements --accept-package-agreements
Automate it with a scheduled task. Run a weekly silent upgrade of every app with no interaction:
# Create a SYSTEM scheduled task that runs winget upgrade --all every Sunday at 3 AM
$action = New-ScheduledTaskAction -Execute "winget" `
-Argument "upgrade --all --silent --accept-source-agreements --accept-package-agreements"
$trigger = New-ScheduledTaskTrigger -Weekly -DaysOfWeek Sunday -At 3am
Register-ScheduledTask -TaskName "Winget Weekly Upgrade" `
-Action $action -Trigger $trigger -User "SYSTEM" -RunLevel Highest
Warning:
winget upgrade --allupgrades every matched app in one pass, including browsers and tools that may be in active use. Installers can close running apps without warning, and major version jumps can introduce breaking changes. Test on a pilot machine before scheduling--all --silentacross a fleet, and review the upgrade list (winget upgrade) before running it broadly.
winget uninstall: Remove Packages
winget uninstall (alias winget remove) removes an installed package. As with install, use -e --id so you remove exactly the app you mean.
Windows 10 1809+Windows 11Server 2022+⚠ Removes software
winget uninstall Option Reference
| Option | Description |
|---|---|
-e, --exact | Exact, case-sensitive match (avoid removing the wrong app) |
--id <id> | Uninstall by package Id |
--name <name> | Uninstall by package Name |
-v, --version <ver> | Target a specific installed version |
--silent, -h | Suppress the uninstaller UI |
--purge | Also delete files left in the package's install directory (portable packages) |
--all-versions | Remove every installed version of the package |
winget uninstall Usage Examples
# Remove an app by exact ID
winget uninstall -e --id Mozilla.Firefox
# Silent removal for scripts
winget uninstall -e --id Notepad++.Notepad++ --silent
# Remove a portable app and clean up its folder
winget uninstall -e --id sharkdp.bat --purge
Warning:
winget uninstallpermanently removes the application and, with--purge, deletes files left in its install directory. There is no undo. Double-check the Id withwinget listbefore running uninstall in a script, and never pipe an unfiltered list into uninstall.
winget show: Inspect a Package
winget show prints full metadata for a single package — publisher, description, homepage, installer type, and (with --versions) every version winget can install. It downloads nothing.
Windows 10 1809+Windows 11Read-only — installs nothing
winget show Option Reference
| Option | Description |
|---|---|
<query> / --id / --name | Select the package to inspect |
-e, --exact | Require an exact match |
--versions | List all available versions instead of details |
-v, --version <ver> | Show metadata for one specific version |
--source <name> | Inspect the package from a specific source |
winget show Usage Examples
# Full details about a package
winget show -e --id Git.Git
# List every version you could install
winget show -e --id Git.Git --versions
# Inspect a single version
winget show -e --id Git.Git --version 2.44.0
Tip: Run
winget show --id <id> --versionsbefore a--versioninstall or a version-pinned deployment so you only request versions winget actually has manifests for.
winget source: Manage Package Sources
A source is a repository winget pulls packages from. Two ship by default: winget (the community repository) and msstore (the Microsoft Store). winget source lists, adds, refreshes, and resets them.
Default: winget + msstoreSupports private/internal sources
winget source Subcommand Reference
| Subcommand | Description |
|---|---|
list | Show configured sources and their URLs |
add --name <n> --arg <url> | Add a source (e.g. an internal REST repository) |
update | Refresh the local cache of one or all sources |
remove --name <n> | Remove a configured source |
reset | Reset sources back to defaults (prompts for confirmation) |
winget source Usage Examples
# List configured sources
winget source list
# Refresh the source index (do this if search returns stale results)
winget source update
# Add a private internal REST source
winget source add --name corp --arg https://winget.corp.local --type Microsoft.Rest
# Reset all sources back to defaults
winget source reset --force
Warning:
winget source reset --forceremoves every custom source and restores only the defaults without prompting. If you rely on an internal/private repository, record its name and URL (winget source list) before resetting so you can re-add it afterward.
winget export & import: Migrate Your App Set
winget export writes every installed package that has a known winget Id to a JSON manifest; winget import reinstalls them from that file. Together they're the fastest way to rebuild a machine or standardize a baseline.
JSON manifestGreat for reimagingSkips apps with no winget source
export / import Option Reference
| Option | Command | Description |
|---|---|---|
-o, --output <file> | export | Path to write the JSON manifest |
--include-versions | export | Record the exact installed version of each app |
--source <name> | export | Only export packages from a given source |
-i, --import-file <file> | import | Path to the JSON manifest to install from |
--ignore-unavailable | import | Skip packages no longer in the source instead of failing |
--ignore-versions | import | Install the latest version even if a version is pinned in the file |
--accept-package-agreements | import | Auto-accept licenses (for unattended setup) |
export / import Usage Examples
# Export every installed app with a known winget ID
winget export -o apps.json
# Export and pin the exact versions currently installed
winget export -o apps.json --include-versions
# Reinstall the whole set on a new machine, unattended
winget import -i apps.json --accept-package-agreements --accept-source-agreements
# Import but skip anything no longer available in the source
winget import -i apps.json --ignore-unavailable
Note: Export only captures apps that map to a winget source entry. Apps installed manually or from sources winget doesn't know about are omitted from the JSON — review the file before relying on it as a complete machine baseline.
Troubleshooting: Common winget Errors
Each row is deep-linkable — share a specific error with …#wg-no-applicable, and the row highlights on arrival.
| Error / Symptom | Meaning | Fix |
|---|---|---|
'winget' is not recognized | App Installer is missing or not on PATH | Install App Installer from the Microsoft Store, or update Windows; on Server install the App Installer package manually |
No applicable installer found | No installer matches the machine's architecture/scope/locale | Check the package supports your CPU (x64/ARM64); try without --scope or use --architecture |
No package found matching input criteria | The query/ID didn't match anything in the sources | Run winget search to confirm the exact Id, then winget source update |
Multiple packages found matching input | The term matched more than one package | Re-run with -e --id <exact-id> to disambiguate |
| Hangs waiting on a license/source prompt | Script ran without accepting agreements | Add --accept-source-agreements --accept-package-agreements |
App shows Unknown / missing from upgrade | winget can't read the installed version | Run winget upgrade --include-unknown; some apps still can't be upgraded by winget |
Installer hash does not match | Downloaded installer differs from the manifest hash | Retry (partial download); if it persists the manifest is outdated — wait or use --ignore-security-hash with caution |
access is denied on a per-machine install | Per-machine install needs elevation | Run the terminal as Administrator, or drop --scope machine for a per-user install |
Version & Compatibility Notes
- winget ships in App Installer. It's preinstalled on Windows 11 and on Windows 10 1809+ once App Installer updates from the Microsoft Store. Check your version with
winget --version. - Windows Server: winget is not included by default on Server 2019/2022. Install the App Installer package (and its dependencies) manually, or use the Server 2025 build where it's more readily available. Source: Microsoft's
winget-clireleases on GitHub. winget updateis an alias forwinget upgrade— both accept the same options, including--all.--silentdepends on the installer. winget can only run an installer silently if the package manifest declares a silent switch. Some installers ignore--silentand still show UI.-hvs--silent: older docs use-h(the short form) for silent installs;--silentis the current, clearer spelling and is preferred in scripts.- Group Policy / Intune: in managed environments, winget behavior (allowed sources, the Store) can be restricted by policy. If
msstoreis blocked, fall back to--source wingetfor community packages. - Configuration files:
winget configure(theMicrosoft.WinGet.Configurationfeature) can apply a full machine setup from a YAML/DSC file — a step beyondimportfor repeatable provisioning.






