Build winget commands to search, install, upgrade and uninstall Windows apps.
winget is the Windows Package Manager — a built-in command-line installer (Windows 10 1809+ and Windows 11) that downloads and installs apps from a trusted catalog without browsers, setup wizards, or bundled junk. This builder produces the exact command for searching, installing, upgrading, uninstalling, and backing up your apps, including the flags that make installs silent and repeatable.
| Task | Command |
|---|---|
| Search | winget search "vlc" |
| Install by ID | winget install --id VideoLAN.VLC -e |
| Upgrade one app | winget upgrade --id VideoLAN.VLC -e |
| Upgrade everything | winget upgrade --all |
| Uninstall | winget uninstall --id VideoLAN.VLC -e |
| List installed | winget list |
| Show details | winget show --id VideoLAN.VLC -e |
--id with -e — match an exact package ID instead of a fuzzy name, so you install the right app. Find the ID with winget search first.--silent — suppress the installer UI and prompts, ideal for scripting.--scope user|machine — install for the current user or for all users (machine-wide installs need Administrator).--version — pin a specific version instead of the latest.--accept-package-agreements --accept-source-agreements — auto-accept license prompts in unattended runs.winget install --id VideoLAN.VLC -e --silent
winget upgrade --all --include-unknown --accept-source-agreements --accept-package-agreements
winget export -o packages.json
winget import -i packages.json --accept-package-agreements --accept-source-agreementsThe export/import pair is the killer feature for rebuilding a machine: export writes every installed package to a JSON manifest, and import reinstalls the whole list on a fresh PC in one command.
By default winget pulls from two sources: the winget community repository (a curated, open catalog of thousands of apps) and the Microsoft Store. Each app has a unique package ID like VideoLAN.VLC or Microsoft.PowerToys in Publisher.Application form. Searching by a friendly name returns candidates, but installing should always use the exact ID so you never pick up a similarly named package by mistake.
winget install commands, or restore a saved manifest with winget import, instead of downloading installers by hand.winget upgrade --all on a schedule closes the gap left by apps without their own auto-updater, reducing exposure to known vulnerabilities.winget list gives a quick inventory of what is on the machine and which apps have updates available.--id with winget search — a fuzzy name can match the wrong package.--include-unknown on upgrade --all also updates apps whose installed version winget cannot detect.winget is the Windows Package Manager, a built-in command-line tool on Windows 10 (1809 and later) and Windows 11. It installs, upgrades, and removes applications from a curated catalog so you can manage software without manual downloads or setup wizards.
Run winget upgrade --all to update everything winget can see. Add --include-unknown to also catch apps whose current version it cannot detect, and the accept-agreement flags to run fully unattended without license prompts.
Use winget install --id Publisher.App -e --silent. The -e flag forces an exact ID match so you get the right package, and --silent suppresses the installer interface and prompts, which is ideal for scripts and remote deployment.
Yes. Run winget export -o packages.json on the old machine to save a manifest of installed packages, then winget import -i packages.json on the new one to reinstall the whole list in a single command.