Skip to content

List or Uninstall by id does not return expected result #2528

Open

Description

Brief description of your issue

Winget list and uninstall does not work with --id

Steps to reproduce

  1. List packages by name:
PS C:\> winget list element
Name    Id              Version Available Source
------------------------------------------------
Element Element.Element 1.11.5            winget
Element Element.Element 1.10.1  1.11.5    winget
  1. List or Uninstall by ID.
PS C:\> winget list --id Element.Element
No installed package found matching input criteria.
PS C:\> winget uninstall --id Element.Element
No installed package found matching input criteria.

Expected behavior

Should list packages with respective ids.

Actual behavior

No installed package found matching input criteria.

Environment

Windows Package Manager (Preview) v1.4.2161-preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22000.978
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.2161.0

Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

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

Activity

  1. ghost added
    Needs-Triage
    on Sep 18, 2022
  2. Trenly commented on Sep 18, 2022

    @Trenly
    Contributor

    Can you provide the log files that are generated when you run winget list --id Element.Element --verbose-logs ?

  3. danielniccoli commented on Sep 18, 2022

    @danielniccoli
    Author

    Hi Trenly, I would like to help out with the logs, but they contain personal information, that I do not want to share. If there's anything specific in it, that I can share, let me know.

    If it helps, I do see the same behaviour with other apps as well e.g., "Microsoft.WindowsSDK". If the issue is not specific to Element, you may find some apps on your computer as well, to reproduce.

    PS C:\> winget list "Windows Software Development Kit"
    Name                                                    Id                   Version          Available    Source
    -----------------------------------------------------------------------------------------------------------------
    Windows Software Development Kit - Windows 10.0.20348.1 Microsoft.WindowsSDK < 10.0.22000.832 10.0.22621.1 winget
    Windows Software Development Kit - Windows 10.0.22621.1 Microsoft.WindowsSDK 10.0.22621.1                  winget
    
  4. added
    Issue-Bug
    and removed
    Needs-Triage
    on Sep 19, 2022
  5. added
    Area-Matching
    on Feb 22, 2023
  6. modified the milestones: v1.5-Client, on Jun 6, 2023
  7. removed this from the milestone on Nov 14, 2024
  8. garretwilson commented on Aug 17, 2026

    @garretwilson

    This is happening with ID SumatraPDF.SumatraPDF, as I reported in #6465 and microsoft/winget-pkgs#418621 .

    How can we trust an install tool to correctly match IDs when it can't even match the IDs its own list command produces?

    Brief description of your issue

    winget list --id SumatraPDF.SumatraPDF isn't matching an installed SumatraPDF that winget list SumatraPDF itself shows.

    This especially prevents upgrading, e.g. winget upgrade -id SumatraPDF.SumatraPDF does not match the existing SumatraPDF installation. Nevertheless the main issue is that winget list --id is not matching an ID that winget list itself returns; that is an inconsistency that is cause for concern, and the root cause should be understood. This goes to the core of security: being able to trust that winget --id … --source … --exact will match the intended target.

    Steps to reproduce

    1. Manually Install SumatraPDF-3.6-64-install.exe.
    2. Run winget upgrade; it will show that SumatraPDF needs upgrading.
    3. Run winget list SumatraPDF. It displays:
      Name       Id                    Version Available
      --------------------------------------------------
      SumatraPDF SumatraPDF.SumatraPDF 3.6     3.6.1
      
    4. Run winget list --id SumatraPDF.SumatraPDF.

    Expected behavior

    winget list --id SumatraPDF.SumatraPDF should list the package that winget list SumatraPDF itself showed earlier!

    Oddly winget download --id SumatraPDF.SumatraPDF does work! But winget upgrade --id SumatraPDF.SumatraPDF does not match.

    Actual behavior

    No installed package found matching input criteria.

    How can we trust the security of a tool that forces us to use fuzzy pattern matching?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-MatchingIssue-Bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions