WinGet¶
- ID
winget- Home page
- Version requirement
>= 1.28.190
- Platforms
🪟 Windows
- Operations
installed·outdated·search·install·upgrade·upgrade_all·remove·sync- purl types
pkg:winget- Brewfile entry
winget, in Brewfile backups- CLI name
winget- Every call
winget <command> --accept-source-agreements --disable-interactivity- Issues and PRs
- Source
Microsoft’s official Windows package manager.
mpm reads inventory from winget list --details, whose Key: Value
blocks carry the installed version and an Available Upgrades section,
and reads search from winget’s fixed-width column table.
Note
installed and outdated keep only rows whose Origin Source is
winget, dropping packages winget merely tracks (sideloaded, portable
or Microsoft Store). Store entries still surface in search, but their
real version cannot be queried through winget, so mpm tags them with
an msstore sentinel version and sorts them below winget-native ones.
Warning
Two Windows-only, process-level workarounds keep winget from taking the calling process down with it:
winget is spawned with
DETACHED_PROCESS. Its COM server and installer children callGenerateConsoleCtrlEventas they shut down, broadcasting aCTRL_C_EVENTto every process sharing their console: detaching removes winget from that console, so the signal never reaches the caller.WindowsPackageManagerServer.exeis killed by image name after each call. This COM server is activated out-of-process, so it never inherits mpm’s pipes and is never reaped bycommunicate().
What mpm adds to winget¶
mpm reaches across every manager at once, not winget alone: mpm installed and mpm outdated cover winget alongside every other manager you run in one table, mpm upgrade --all updates them together, and mpm sbom exports the whole machine as one bill of materials.
Every mpm command also gains --dry-run and --plan previews, cross-scheme version comparison and purl identifiers. See manager augmentations for how each one is built.
Your winget commands, in mpm¶
You already know winget: each operation maps one-to-one onto mpm, in an interface shared by every manager.
To… |
With |
With |
|---|---|---|
List what’s installed |
|
|
List outdated packages |
|
|
Search for a package |
|
|
Install a package |
|
|
Upgrade one package |
|
|
Upgrade everything |
|
|
Remove a package |
|
|
Prefix any command above with --dry-run to simulate the underlying manager calls without touching the system: the safe way to watch what mpm would do before trusting it.
Operations¶
Operation |
Supported |
|---|---|
|
✓ |
|
✓ |
|
|
|
✓ |
|
✓ |
|
✓ |
|
✓ |
|
✓ |
|
✓ |
|
|
|
Selecting and configuring winget¶
Deselect winget for a single run with --no-winget, or persist the choice in your configuration:
[mpm]
winget = false
The arguments and environment variables listed in the box atop this page are forced on every winget call, so runs stay quiet, non-interactive and reproducible: the defaults you would set in CI anyway.
Keep it enabled but tune how mpm drives it with a per-manager override:
[mpm.managers.winget]
timeout = 900
mpm config-template winget prints every overridable attribute as a ready-to-paste block.
Recipes¶
A few jobs you would otherwise script around winget, one mpm command each:
Snapshot and clone a machine:
mpm --winget dump winget.toml, thenmpm restore winget.tomlon the next one.Export a Brewfile entry instead:
mpm --winget dump --brewfile Brewfile.Export a compliance SBOM:
mpm --winget sbom(CycloneDX by default,--spdxfor SPDX).
Privilege escalation¶
mpm runs this manager as the current user and never prepends sudo by default. Flip the policy for its privileged operations with --sudo or the per-manager sudo override.
See privilege escalation for the full policy.
Cooldown¶
State of WinGet’s release-age gating, from the cooldown support table:
Status: 🚧 Proposed
Mechanism: open feature request
Reference: microsoft/winget-cli#6178
A cooldown only pays off where a compromised release can be withdrawn while the clock runs, and can only be emulated where the registry dates its releases. From the retraction table:
Registry: Git-manifest indexes
Retraction: Index revert: reverting the manifest, Portfile or derivation commit withdraws the version
Publish date: ❌ only the commit date, which is client-set and trivially backdated
With --cooldown set, mpm skips this manager’s install and upgrade operations rather than run them unguarded (fail-closed); --allow-unsupported-managers opts back in.
Version probe¶
The version is probed by running:
$ winget --version
v1.28.220
and extracted with:
r"v(?P<version>\S+)"
Reference traces¶
Raw native outputs captured in the manager source: the reference mpm’s parsers were written against. If you know WinGet well and a transcript below looks wrong, or a newer release changed its output format, report it.
> winget list --details --accept-source-agreements --disable-interactivity
(1/7) CCleaner [CCleaner]
Version: 6.08
Publisher: Piriform Software Ltd
Local Identifier: ARP\Machine\X64\CCleaner
Product Code: CCleaner
Installer Category: exe
Installed Scope: Machine
Installed Architecture: X64
Installed Locale: en-US
Origin Source: winget
Available Upgrades:
(2/7) Git [Git.Git]
Version: 2.37.3
Publisher: The Git Development Community
Origin Source: winget
> winget list --upgrade-available --details --accept-source-agreements --disable-interactivity
(1/4) Git [Git.Git]
Version: 2.37.3
Publisher: The Git Development Community
Origin Source: winget
Available Upgrades:
winget [2.45.1]
(2/4) Microsoft Edge [Microsoft.Edge]
Version: 109.0.1518.70
Publisher: Microsoft
Origin Source: winget
Available Upgrades:
winget [125.0.2535.51]
Feed any of these through mpm and the raw output becomes one uniform table, the same shape for every manager: filter it, project columns, or export it (mpm --winget installed --output json, or csv, toml, yaml), each package carrying a purl and a version comparable across managers.
Changelog¶
7.4.0(2026-07-25)Documentation samples use the conventional
>PowerShell prompt instead ofPS C:\Users\kev>, reconnecting them to the corpus harvester: the documented commands are now validated against the constructed ones, the manager page gains its full Rosetta table and a clean version transcript, and the reference traces render under properpwsh-sessionfences. The full and single-package upgrade samples show the exactwinget update --allandwinget installinvocationsmpmruns, and the agreement-prompt and different-install-technology illustrations move to non-fixtureconsolefences.
6.4.1(2026-05-04)Fix the parsing of
wingettables: the package-block split no longer fires on indented upgrade rows, and the table width is read from the separator line, which stays full-width even whenwingettrims the trailing spaces of the header. Microsoft Store entries are recognized from their 12-character product ID or theirXP-prefixed extension ID.
6.4.0(2026-04-27)Add
syncoperation.Fix
searchcrash when no results are returned.
6.3.0(2026-04-09)Switch
installedandoutdatedtowinget list --detailsstructured output; filter toOrigin Source: wingetpackages only, excluding sideloaded and portable entries. Bump minimum required version to>=1.28.190.
5.16.0(2024-05-24)