Skip to content

Winget outputs corrupted JSON due to spinner frames; breaks automation on Windows 11 (retail) #6054

@jentekSF

Description

@jentekSF

Relevant area(s)

WinGet CLI

Relevant command(s)

winget list, winget export, winget upgrade

Brief description of your issue

Winget commands (list, upgrade, export) produce corrupted JSON on Windows 11 due to spinner/progress frames being written into stdout. This breaks JSON parsing, automation, and export workflows

Steps to reproduce

  1. Open PowerShell (elevated or non‑elevated).

  2. Run any of the following commands:

    winget list
    winget upgrade
    winget export -o test.json

  3. Observe that spinner/progress animation frames are written into stdout.

  4. Attempt to parse the output, for example:

    winget list | ConvertFrom-Json

  5. Parsing fails because the output contains spinner frames, stray characters, and invalid JSON.

Expected behavior

Winget should produce clean, valid, machine‑readable JSON with no spinner/progress frames or UI elements in stdout.
When JSON output is requested, only JSON should be emitted.
Redirection should work without requiring -o, and --disable-interactivity should fully suppress all UI output.
Automation and parsing should succeed without errors.

Actual behavior

Winget outputs corrupted, non‑machine‑readable JSON. Spinner/progress animation frames, stray characters, and partial ANSI sequences are written into stdout even when JSON output is requested.
Commands such as list, upgrade, and export produce mixed UI/JSON output that cannot be parsed.
winget export also requires -o even when redirecting, and --disable-interactivity does not suppress UI elements.
Automation and JSON parsing fail as a result.

Environment

Windows Package Manager v1.12.470
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.26200.7840
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.27.470.0

Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads
Configuration Modules              %LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    Command-ExportIssue related to WinGet ExportCommand-ListIssue related to WinGet ListCommand-UpgradeIssue related to WinGet UpgradeIssue-BugIt either shouldn't be doing this or needs an investigation.Resolution-DuplicateIssue is a duplicate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions