Repository navigation
Description
Brief description of your issue
When upgrading programs that share an Id (ex: PostgreSQL.PostgreSQL and Microsoft.DotNet.SDK.6), the upgrade fails with an error message of No installed package found matching input criteria. Other commands such as uninstall 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 and PostgreSQL 15. Run winget 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 install PostgreSQL 16 and that the "available" upgrades for PostgreSQL 11 and PostgreSQL 15 would not appear anymore. I would also expect that winget upgrade --id "PostgreSQL.PostgreSQL", winget upgrade --name "PostgreSQL 11", and winget 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 and 15 of PostgreSQL installed.
Listing available upgrades:
> winget upgrade
Name Id Version Available Source
----------------------------------------------------------------------------------------------------------------------------------
PostgreSQL 11 PostgreSQL.PostgreSQL 11 16.0 winget
PostgreSQL 15 PostgreSQL.PostgreSQL 15 16.0 winget
Trying to update PostgreSQL 11 specifically by name (fails):
> winget upgrade --name "PostgreSQL 11"
No installed package found matching input criteria.
Trying to update PostgreSQL 15 specifically by name (succeeds):
> winget upgrade --name "PostgreSQL 15"
Found PostgreSQL 16 [PostgreSQL.PostgreSQL] Version 16.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
Starting package install...
Successfully installed
Note: I uninstalled PostgreSQL 16 before the next step but I had to do it through the windows GUI under Add or remove programs since if I tried to do it via winget with the command winget uninstall --name "PostgreSQL 16", it failed with the error No installed package found matching input criteria..
Trying to update postgresql via the Id PostgreSQL.PostgreSQL (succeeds):
> winget upgrade --id "PostgreSQL.PostgreSQL"
Found PostgreSQL 16 [PostgreSQL.PostgreSQL] Version 16.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://get.enterprisedb.com/postgresql/postgresql-16.0-1-windows-x64.exe
██████████████████████████████ 391 MB / 391 MB
Successfully verified installer hash
Starting package install...
Successfully installed
Even though PostgreSQL 16 is installed now, winget upgrade still lists the previous PostgreSQL versions as needing an upgrade. If I run any of the upgrade commands above again, they all display the error No installed package found matching input criteria.
> winget upgrade
Name Id Version Available Source
----------------------------------------------------------------------------------------------------------------------------------
PostgreSQL 11 PostgreSQL.PostgreSQL 11 16.0 winget
PostgreSQL 15 PostgreSQL.PostgreSQL 15 16.0 winget
>
> winget upgrade --name "PostgreSQL 11"
No installed package found matching input criteria.
>
> winget upgrade --name "PostgreSQL 15"
No installed package found matching input criteria.
>
> winget upgrade --id "PostgreSQL.PostgreSQL"
No installed package found matching input criteria.
Environment
`Windows Package Manager v1.6.2771`
`Windows: Windows.Desktop v10.0.22621.2283`
`Package: Microsoft.DesktopAppInstaller v1.21.2771.0`
**Note:** This is the output from `winget --info` but I do have Windows 11, not 10 so I'm not sure why it shows 10 as my desktop version.
Activity
denelon commentedon Oct 11, 2023
Related to:
SuperBartimus commentedon Oct 11, 2023
I'm seeing similarly:
I then perform:
and then going back to:
You can see it upgraded one of them. If I do the the upgrade command again, I get this:
And if I issue this command, this is the result:
... you can see the IDs are identical.
Using the
--exactflag doesn't help.I'm also experiencing this issue with
Microsoft.DotNet.AspNetCore.6