If you've outgrown copy-pasting from random Stack Overflow answers, here's every winget command you'll actually use — with a real example for each.
Setup & info
1. winget --version
Check which winget you have installed.
winget --version
If this fails, see How to install winget on Windows 10.
2. winget --info
Show full configuration: sources, log paths, settings file location.
winget --info
Useful when troubleshooting.
3. winget --help
Top-level help. Add --help to any subcommand for details:
winget install --help
Search & discover
4. winget search <query>
Find packages by name, tag, or description.
winget search firefox
winget search "visual studio code"
winget search --tag database
winget search --publisher "Mozilla"
5. winget show <id>
Show full details for one package: description, versions, installer URL, SHA-256.
winget show --id Microsoft.VisualStudioCode
winget show --id Microsoft.VisualStudioCode --versions
The --versions flag lists every available version.
6. winget list
List installed apps (winget-tracked or not).
winget list
winget list --name "visual studio"
winget list --upgrade-available
winget list --source winget
Install
7. winget install <id>
The bread and butter. Always use -e (exact) to avoid wrong matches.
winget install --id Mozilla.Firefox -e
Common flags:
winget install --id <ID> -e --silent --accept-package-agreements --accept-source-agreements
8. winget install --scope user|machine
Per-user (no admin) vs system-wide install.
winget install --id Microsoft.VisualStudioCode --scope user
winget install --id Microsoft.VisualStudioCode --scope machine
9. winget install --version <X.Y.Z>
Install a specific version (not the latest).
winget install --id OpenJS.NodeJS --version 20.18.0
10. winget install --architecture x64|arm64|x86
Force architecture (useful on ARM machines or x86 compatibility scenarios).
winget install --id Microsoft.VisualStudioCode --architecture arm64
Upgrade
11. winget upgrade
List available updates without installing.
winget upgrade
12. winget upgrade --all
Update everything in one shot.
winget upgrade --all --include-unknown --accept-package-agreements --accept-source-agreements
Full guide: How to update all Windows apps with winget upgrade.
13. winget upgrade <id>
Update one specific app.
winget upgrade --id Microsoft.VisualStudioCode
Uninstall
14. winget uninstall <id>
Remove an app. Full guide: How to uninstall Windows apps with winget.
winget uninstall --id Discord.Discord -e
winget uninstall --id Some.App --silent --disable-interactivity
Pin (lock versions)
15. winget pin add <id>
Prevent winget upgrade from touching this app.
winget pin add --id OpenJS.NodeJS.LTS
winget pin add --id Some.App --version 1.2.0
16. winget pin list
Show pinned apps.
winget pin list
17. winget pin remove <id>
Unpin.
winget pin remove --id OpenJS.NodeJS.LTS
18. winget pin reset
Remove all pins.
winget pin reset --force
Export / import
19. winget export -o <file.json>
Save your installed app list to JSON.
winget export -o my-apps.json --include-versions
winget export -o my-apps.json --include-versions --source winget
20. winget import -i <file.json>
Install everything from a JSON list — perfect for new-machine setup.
winget import -i my-apps.json --accept-package-agreements --accept-source-agreements --ignore-unavailable
Detailed guide: How to use winget import.
Source management
21. winget source list
Show configured catalog sources.
winget source list
22. winget source update
Refresh the local catalog index.
winget source update
23. winget source reset --force
Nuke the local index and re-download. Fixes most search issues.
winget source reset --force
Full troubleshooting: Winget search not working.
24. winget source add
Add a custom source (private repo, internal mirror).
winget source add --name internal --arg https://repo.company.com --type Microsoft.PreIndexed.Package
25. winget source remove
Remove a source.
winget source remove --name msstore
Configuration
26. winget configure <yaml>
Apply a DSC configuration file — declarative machine setup.
winget configure -f setup.dsc.yaml
27. winget settings
Open the JSON settings file in your default editor.
winget settings
winget settings --enable LocalManifestFiles
Hash verification
28. winget hash <file>
Compute SHA-256 of a local installer (useful when authoring manifests).
winget hash C:\Users\me\Downloads\app-installer.exe
Repair / validate
29. winget repair <id>
Re-run the installer to fix a broken app.
winget repair --id Microsoft.VisualStudioCode
30. winget validate <manifest>
Validate a YAML manifest before submitting to winget-pkgs.
winget validate --manifest C:\path\to\manifests\v\Vendor\App\1.0.0
The "I'm in a hurry" cheatsheet
If you only memorise 8 commands:
winget search <name> # find an app
winget install --id <ID> -e # install it
winget list # what's installed
winget upgrade # what's outdated
winget upgrade --all # update everything
winget uninstall --id <ID> # remove
winget export -o my.json # save your list
winget import -i my.json # restore
That covers 95% of daily use.
Useful flag combinations
Silent, no prompts, always proceed:
--silent --disable-interactivity --accept-package-agreements --accept-source-agreements
For unattended scripts (CI, Task Scheduler):
winget upgrade --all --include-unknown --silent --disable-interactivity --accept-package-agreements --accept-source-agreements
To force re-install:
winget install --id <ID> --force
To install without admin (per-user):
winget install --id <ID> --scope user
What's next?
- Winget commands cheatsheet (printable) → — earlier shorter reference
- How to install Windows apps with winget → — beginner guide
- How to update all apps → — upgrade workflow
- Fresh Windows 11 setup → — putting it all together
