microsoft / microsoft/winget-cli
Uninstallation: `No installed package found matching input criteria.` (--name/--id behaviour)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
Hi
i was trying to update MPC-HC and i discovered that somehow i had 2 versions installed, 1.x and 2.0 (which is the last stable version).
PS C:\_> winget list --name mpc-hc
Name Id Version Available Source
------------------------------------------------------------
MPC-HC 2.0.0 (64-bit) clsid2.mpc-hc 2.0.0 winget
MPC-HC 1.9.24 clsid2.mpc-hc 1.9.24 2.0.0 winget
PS C:\_> winget upgrade
Name Id Version Available Source
-------------------------------------------------------------------------------------------
Microsoft .NET Core SDK 3.1.302 (x64) Microsoft.DotNet.SDK.3_1 < 3.1.419 3.1.426 winget
Python 3.7.7 (32-bit) Python.Python.3.7 3.7.7 3.7.9 winget
MPC-HC 1.9.24 clsid2.mpc-hc 1.9.24 2.0.0 winget
Dokan Library 1.3.1.1000 Bundle dokan-dev.Dokany 1.3.1.1000 2.0.6.1000 winget
4 upgrades available.
3 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
winget reported that the 1.x version had an update available, to the already installed 2.0 version.
So i simply tried to remove the old version but i could not do it in any way.
There seems to be 2 different problems, one with --name, one with --id.
See sections below for details.
I finally found a way by specifying the exact name with quotes:
PS C:\_> winget uninstall "MPC-HC 1.9.24"
Found MPC-HC [clsid2.mpc-hc]
Starting package uninstall...
Successfully uninstalled
Steps to reproduce
have those 2 versions installed then try to remove the old one
Expected behavior
the correct version is found via --id (and possibly --version) or via --name, and removed
Actual behavior
--id
it doesn't work at all, with or without --version:
PS C:\_> winget uninstall --id clsid2.mpc-hc --version 1.9.24
No installed package found matching input criteria.
PS C:\_> winget uninstall --id clsid2.mpc-hc
No installed package found matching input criteria.
--name
winget uninstall --name XXX doesn't work like winget list --name XXX. Why is that?
PS C:\_> winget list --name mpc-hc
Name Id Version Available Source
------------------------------------------------------------
MPC-HC 2.0.0 (64-bit) clsid2.mpc-hc 2.0.0 winget
MPC-HC 1.9.24 clsid2.mpc-hc 1.9.24 2.0.0 winget
PS C:\_> winget uninstall --name mpc-hc
No installed package found matching input criteria.
PS C:\_> winget uninstall mpc-hc --version 1.9.24
No installed package found matching input criteria.
PS C:\_> winget uninstall mpc-hc
No installed package found matching input criteria.
PS C:\_> winget uninstall -q mpc-hc
No installed package found matching input criteria.
Environment
Windows Package Manager v1.4.10173
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22621.1413
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.10173.0
Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the documented winget uninstall commands with two installed versions of MPC-HC, comparing --id, --version, and --name behavior with winget list. Done means the correct installed version can be selected and removed using the expected criteria, while existing uninstall behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100