microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.27k stars 1.45k forks source link

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

Open danielniccoli opened 2 years ago

danielniccoli commented 2 years ago

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
Trenly commented 2 years ago

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

danielniccoli commented 2 years ago

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