winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

Uninstall by ID fails with incorrect message when multiple versions are present

Open sba923 opened this issue 2 years ago • 2 comments

Brief description of your issue

One one of my machines a number of different versions of some apps are installed:

image

image

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:

image

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:

image

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

sba923 avatar Aug 28 '22 11:08 sba923

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: image

hisuwh avatar Nov 21 '22 10:11 hisuwh

.NET Core SDK 2 shouldn't be matching with 3_1

denelon avatar Feb 22 '23 16:02 denelon