winget-cli
winget-cli copied to clipboard
Uninstall by ID fails with incorrect message when multiple versions are present
Brief description of your issue
One one of my machines a number of different versions of some apps are installed:
I thought I would be able to uninstall all versions by ID and then uninstall only the most recent, but uninstalling fails in that case:
My analysis is that winget
cannot determine which of the installed versions to uninstall, but the message is obviously incorrect.
Uninstalling by name works, albeit with somewhat confusing output:
Steps to reproduce
Attempt winget uninstall --id
with multiple copies of the same app (with the same ID) are present.
Expected behavior
The operation should fail with a message similar to 'Multiple packages with ID xxx are present'.
Actual behavior
winget uninstall
incorrectly states that no installed package matches the specified ID.
Environment
Windows Package Manager v1.3.2091
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.19044.1889
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.18.2091.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
Is there a solution to this? I have multiple versions of the same application installed:
$ winget list -q pulumi
Name Id Version Available Source
---------------------------------------------
Pulumi Pulumi.Pulumi 3.39.3 3.47.1 winget
Pulumi Pulumi.Pulumi 3.40.2 3.47.1 winget
Trying to upgrade, or uninstall I get Multiple installed packages found matching input criteria
. Even trying to target a specific version:
.NET Core SDK 2 shouldn't be matching with 3_1