Removing a manifest version (rather than superseding it) can cause `winget upgrade` to silently downgrade, reproducing the known duplicate-entry bug via an unusual trigger
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 50/100
Hướng nghiên cứu
Start with the winget upgrade and winget uninstall command paths, then reproduce the HWiNFO scenario using the listed manifest versions and commands. Trace how the installed and target versions are compared and how multiple entries sharing an uninstaller are handled. Done means an older target is refused or explicitly identified as a downgrade, and the resulting entries can be removed as expected.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Relevant area(s)
WinGet CLI
Relevant command(s)
winget upgrade, winget uninstall
Brief description of your issue
The "upgrade leaves two Add/Remove Programs entries" symptom is already well documented (#4066, #1376, #2269, #5615) and has been reported since at least 2021. What doesn't appear to be documented is one specific way to trigger it: removing a manifest version from the repo (as opposed to replacing it with a newer one) rather than a routine version bump. When that happens, "latest" can resolve backward to a much older version line than what's installed, and winget upgrade treats that as a normal forward upgrade with no downgrade warning — reproducing the duplicate-entry bug plus an actual downgrade, from a trigger that none of the linked issues describe.
Note then I hit a second issue, wherein winget uninstall --id REALiX.HWiNFO --all-versions only removed the first one because both installed entries referenced the same uninstaller .exe file. The upgrade bug is the main one, however.
Concrete case
REALiX.HWiNFO8.50 had a dead installer URL (winget-pkgs#437631).- Because manifest edits aren't allowed under repo policy, 8.50 was removed outright rather than fixed (
winget-pkgs#438028). - The replacement, 8.52, was sitting unmerged in
winget-pkgs#423793 at the time. - With no 8.x manifest available, the highest remaining version resolved to 7.72 — several major versions behind what I had installed.
- Running
winget upgradetreated 7.72 as a valid forward upgrade over the installed 8.50. It installed 7.72 without removing 8.50, resulting in two Add/Remove Programs entries. winget uninstall REALiX.HWiNFOonly removed one of the two. The other was orphaned and invisible to winget; I had to remove it manually with a third-party tool (BCUninstaller).
Why this isn't just "another instance" of the existing reports
The Blender/WinPaletter/Cyotek/SSMS reports (#4066, #4475, #1376, #2269) all involve a normal version bump splitting into two tracked entries — seemingly a metadata-matching issue between version lines. Mine involves the available version moving backward relative to what's installed, because the manifest for the installed version disappeared from the repo entirely. That's a different root cause even though the client-side symptom looks identical, and it means the fix isn't just "match versions better" — it's "detect when the target version is older than the installed version and refuse/warn instead of treating it as an upgrade," which is exactly the gap #929 and #1543 already point at but haven't been tied to a repo-side removal scenario.
Steps to reproduce
- Have
REALiX.HWiNFO8.50 installed via winget. - Manifest 8.50 removed from
winget-pkgs(#438028) while replacement 8.52 (#423793) is unmerged, leaving 7.72 as the highest available manifest. winget upgrade REALiX.HWiNFO.- Observe: 7.72 installs without removing 8.50; two entries appear in Add/Remove Programs;
winget uninstallclears only one.
Expected behavior
winget upgradeshould compare the target manifest version against the actually installed version and refuse (or explicitly flag as a downgrade, per thedeneloncomment on #1192 about the "unknown" vs "latest" distinction) rather than silently installing something older.- Whatever dedupe/identity logic causes the two-entries problem in #4066 etc. applies here too and should get fixed once, not per-package.
winget uninstallshould be able to find and remove both entries when this has already happened, rather than leaving one orphaned.
Actual behavior
winget upgradeinstalls HWiNFO 7.72 side-by-side with HWiNFO 8.50.winget uninstall --id REALiX.HWiNFO --all-versionsonly uninstalls 8.50, as both use the same uninstall executable and the first uninstall removes it.
Environment
Windows Package Manager (Preview) v1.30.140-preview
© 2026 Microsoft. All rights reserved.
Windows: Windows.Desktop v10.0.26200.9448
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.30.140.0
WinGet Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User) %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root C:\Program Files\WinGet\Packages
Portable Package Root (x86) C:\Program Files (x86)\WinGet\Packages
Installer Downloads %USERPROFILE%\Downloads
Configuration Modules %LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules
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
Admin Setting State
--------------------------------------------------
LocalManifestFiles Disabled
BypassCertificatePinningForMicrosoftStore Enabled
InstallerHashOverride Disabled
LocalArchiveMalwareScanOverride Disabled
ProxyCommandLineOptions Disabled
ConfigurationProcessorPath Disabled
DefaultProxy Disabled
- Ngôn ngữ chính
- C++
- Star
- 26.6k
- Fork
- 1.8k
- Merge trung bình
- 3 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 41
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/winget-cli
-
Issue-Docs Needs-Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
microsoft/winget-cli#6692 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Issue-Docs Possible-Duplicate
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
microsoft/winget-cli#6493 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
WinGetSourceCreator: PackWithMappingFile should verify makeappx.exe exists before invoking itĐang mởIssue-Feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/winget-cli#6427 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Issue-Docs msstore
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
microsoft/winget-cli#6331 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Command-Source Issue-Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/winget-cli#6148 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của microsoft/winget-cli
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
stratum-mining/sv2-tp#167 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Sign up button opens the Sign in page instead of the Sign up page for Enterprise edition serversĐang mởauth bug ui/ux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
MerginMaps/mobile#4795 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
HarperFast/rocksdb-js#1118 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
26.04 bug dark-mode Easy Hack impress symptom: visual
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CollaboraOnline/online#16421 · 1 bình luận ·