Commands referencing packages that share an Id often throw the error message "No installed package found matching input criteria" #3750
Labels
Area-Matching
Issue related to correlation between installed package and manifest
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Brief description of your issue
When upgrading programs that share an Id (ex:
PostgreSQL.PostgreSQL
andMicrosoft.DotNet.SDK.6
), the upgrade fails with an error message ofNo installed package found matching input criteria
. Other commands such asuninstall
can also fail when referencing packages by name. Them sharing an Id is an observation on my end for the packages that continually fail to perform winget actions, but this could be a larger issue or package specific issues.Steps to reproduce
Install
PostgreSQL 11
andPostgreSQL 15
. Runwinget upgrade
to view that there are two entries for postgresql updates that both point to the latest version (16
at the time of writing this).Expected behavior
I would expect that if I reference one of the available postgresql versions by their names during a command (ex:
winget upgrade --name "PostgreSQL 11
), that it would installPostgreSQL 16
and that the "available" upgrades forPostgreSQL 11
andPostgreSQL 15
would not appear anymore. I would also expect thatwinget upgrade --id "PostgreSQL.PostgreSQL"
,winget upgrade --name "PostgreSQL 11"
, andwinget upgrade --name "PostgreSQL 15"
would all succeed regardless of which one I ran whether I reference them by name or Id.Actual behavior
References to the Id work for upgrades but references to the package name only sometimes work. Also, after upgrading to
PostgreSQL 16
,winget upgrade
still shows the other postgresql versions as having an "available" upgrade but fail to "upgrade" when I try again. I'll list the steps for testing that I went through to verify that below:I started with only versions
11
and15
ofPostgreSQL
installed.Listing available upgrades:
Trying to update
PostgreSQL 11
specifically by name (fails):Trying to update
PostgreSQL 15
specifically by name (succeeds):Note: I uninstalled
PostgreSQL 16
before the next step but I had to do it through the windows GUI underAdd or remove programs
since if I tried to do it via winget with the commandwinget uninstall --name "PostgreSQL 16"
, it failed with the errorNo installed package found matching input criteria.
.Trying to update postgresql via the Id
PostgreSQL.PostgreSQL
(succeeds):Even though
PostgreSQL 16
is installed now,winget upgrade
still lists the previousPostgreSQL
versions as needing an upgrade. If I run any of the upgrade commands above again, they all display the errorNo installed package found matching input criteria.
Environment
The text was updated successfully, but these errors were encountered: