winget-cli
winget-cli copied to clipboard
WinGet keeps reinstalling same updates that were marked as successful
Brief description of your issue
Seems WinGet keeps on installing (some of) the updates again and again
Steps to reproduce
probably machine-specific, see output
Expected behavior
Shouldn't keep on installing the same succesful installs
Actual behavior
Microsoft Windows [Version 10.0.22000.778] (c) Microsoft Corporation. Με επιφύλαξη κάθε νόμιμου δικαιώματος.
C:\WINDOWS\system32>winget upgrade --all -h Found 7-Zip [7zip.7zip] Version 22.00 Found Git [Git.Git] Version 2.37.0 Found VoiceBot [BinaryFortress.VoiceBot] Version 3.8.2 Found Microsoft Teams [Microsoft.Teams] Version 1.5.00.14473 Found Webex [Cisco.WebexTeams] Version 42.6.0.22645 Found LibreOffice [TheDocumentFoundation.LibreOffice] Version 7.3.4.2 Found Microsoft Visual C++ 2015-2022 Redistributable (x64) [Microsoft.VC++2015-2022Redist-x64] Version 14.32.31332.0 Found GOG GALAXY [GOG.Galaxy] Version 2.0.49.1 Found OpenVPN [OpenVPNTechnologies.OpenVPN] Version 2.5.036 Found Viber [Viber.Viber] Version 17.9.0.0 (1/10) Found 7-Zip [7zip.7zip] Version 22.00 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://www.7-zip.org/a/7z2200-x64.exe ██████████████████████████████ 1.49 MB / 1.49 MB Successfully verified installer hash Starting package install... Successfully installed
(2/10) Found Git [Git.Git] Version 2.37.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://github.com/git-for-windows/git/releases/download/v2.37.0.windows.1/Git-2.37.0-64-bit.exe ██████████████████████████████ 46.9 MB / 46.9 MB Successfully verified installer hash Starting package install... Successfully installed
(3/10) Found VoiceBot [BinaryFortress.VoiceBot] Version 3.8.2 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
(4/10) Found Microsoft Teams [Microsoft.Teams] Version 1.5.00.14473 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://statics.teams.cdn.office.net/production-windows-x64/1.5.00.14473/Teams_windows_x64.exe ██████████████████████████████ 120 MB / 120 MB Successfully verified installer hash Starting package install... Successfully installed
(5/10) Found Webex [Cisco.WebexTeams] Version 42.6.0.22645 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://binaries.webex.com/WebexTeamsDesktop-Windows-Gold/Webex.msi ██████████████████████████████ 278 MB / 278 MB Successfully verified installer hash Starting package install... Successfully installed
(6/10) Found LibreOffice [TheDocumentFoundation.LibreOffice] Version 7.3.4.2 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://downloadarchive.documentfoundation.org/libreoffice/old/7.3.4.2/win/x86_64/LibreOffice_7.3.4.2_Win_x64.msi ██████████████████████████████ 331 MB / 331 MB Successfully verified installer hash Starting package install... Successfully installed
(7/10) Found Microsoft Visual C++ 2015-2022 Redistributable (x64) [Microsoft.VC++2015-2022Redist-x64] Version 14.32.31332.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://download.visualstudio.microsoft.com/download/pr/ed95ef9e-da02-4735-9064-bd1f7f69b6ed/CE6593A1520591E7DEA2B93FD03116E3FC3B3821A0525322B0A430FAA6B3C0B4/VC_redist.x64.exe ██████████████████████████████ 24.0 MB / 24.0 MB Successfully verified installer hash Starting package install... Successfully installed
(8/10) Found GOG GALAXY [GOG.Galaxy] Version 2.0.49.1 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... Installer failed with exit code: 1 Installer log is available at: C:\Users\birbi\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir\WinGet-GOG.Galaxy.2.0.49.1-2022-07-07-05-01-51.906.log
(9/10) Found OpenVPN [OpenVPNTechnologies.OpenVPN] Version 2.5.036 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://swupdate.openvpn.org/community/releases/OpenVPN-2.5.7-I602-amd64.msi ██████████████████████████████ 4.18 MB / 4.18 MB Successfully verified installer hash Starting package install... Successfully installed
(10/10) Found Viber [Viber.Viber] Version 17.9.0.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://download.cdn.viber.com/desktop/windows/ViberSetup.exe ██████████████████████████████ 122 MB / 122 MB Successfully verified installer hash Starting package install... Successfully installed
C:\WINDOWS\system32>winget upgrade --all -h Found VoiceBot [BinaryFortress.VoiceBot] Version 3.8.2 Found Webex [Cisco.WebexTeams] Version 42.6.0.22645 Found GOG GALAXY [GOG.Galaxy] Version 2.0.49.1 Found Microsoft Visual C++ 2015-2022 Redistributable (x64) [Microsoft.VC++2015-2022Redist-x64] Version 14.32.31332.0 (1/4) Found VoiceBot [BinaryFortress.VoiceBot] Version 3.8.2 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://binaryfortressdownloads.com/Download/BFSFiles/123/VoiceBotSetup-3.8.2.exe ██████████████████████████████ 12.2 MB / 12.2 MB Successfully verified installer hash Starting package install... Successfully installed
(2/4) Found Webex [Cisco.WebexTeams] Version 42.6.0.22645 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://binaries.webex.com/WebexTeamsDesktop-Windows-Gold/Webex.msi ██████████████████████████████ 278 MB / 278 MB Successfully verified installer hash Starting package install... Successfully installed
(3/4) Found GOG GALAXY [GOG.Galaxy] Version 2.0.49.1 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... Installer failed with exit code: 1 Installer log is available at: C:\Users\birbi\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir\WinGet-GOG.Galaxy.2.0.49.1-2022-07-07-05-14-20.753.log
(4/4) Found Microsoft Visual C++ 2015-2022 Redistributable (x64) [Microsoft.VC++2015-2022Redist-x64] Version 14.32.31332.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://download.visualstudio.microsoft.com/download/pr/ed95ef9e-da02-4735-9064-bd1f7f69b6ed/CE6593A1520591E7DEA2B93FD03116E3FC3B3821A0525322B0A430FAA6B3C0B4/VC_redist.x64.exe ██████████████████████████████ 24.0 MB / 24.0 MB Successfully verified installer hash Starting package install... Successfully installed
C:\WINDOWS\system32>winget upgrade --all -h Found VoiceBot [BinaryFortress.VoiceBot] Version 3.8.2 Found Webex [Cisco.WebexTeams] Version 42.6.0.22645 Found GOG GALAXY [GOG.Galaxy] Version 2.0.49.1 Found Microsoft Visual C++ 2015-2022 Redistributable (x64) [Microsoft.VC++2015-2022Redist-x64] Version 14.32.31332.0 (1/4) Found VoiceBot [BinaryFortress.VoiceBot] Version 3.8.2 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://binaryfortressdownloads.com/Download/BFSFiles/123/VoiceBotSetup-3.8.2.exe ██████████████████████████████ 6.00 MB / 12.2 MB Package download canceled.
Cancelled
Environment
Windows Package Manager v1.2.11601
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22000.778
Package: Microsoft.DesktopAppInstaller v1.17.11601.0
- GOG is because of an unknown version. Update to the latest preview version of the client to fix this. https://github.com/microsoft/winget-pkgs/issues/27206
- VC++ is because of a regex issue and no fix is available yet https://github.com/microsoft/winget-cli/issues/1413
- WebexTeams is most likely because of some weirdness with how the publisher updates their application, and isn’t something we can fix; See the comments on this thread https://github.com/microsoft/winget-pkgs/issues/28846#issuecomment-928559311
I am also seeing where winget says I have updates but it's definitely already installed them. If I run winget upgrade --all then it will just reinstall the same things over and over again and still report that they have not been upgraded.
Here is my list of apps that report upgrades but are already installed:

- Firefox is due to an issue with DisplayVersion mapping. See @yao-msft’s comments in https://github.com/microsoft/winget-pkgs/pull/65875
- SQLServerManagementStudio is due to https://github.com/microsoft/winget-cli/issues/2152
- The dotnet runtimes are due to there being multiple versions of the runtime installed side-by-side and is related to https://github.com/microsoft/winget-cli/issues/1413
- The Visual C++ Redistributables are also due to there being multiple versions side by side and is also caused by https://github.com/microsoft/winget-cli/issues/1413
- WindowsPCHealthCheck has two installation options - OEM and Winget. If upgraded through winget, sometimes the OEM version will not be uninstalled. Check
winget list WindowsPCHealthCheckto see if you have more than one version installed. Related to https://github.com/microsoft/winget-cli/issues/2053
Thank you @Trenly for that detailed info!!!
Looks like Windows PC Health Check was only installed using winget

The list doesn't mean that HealthCheck came from the "winget" source, it just means we were able to match the installed package against one that is available in the source.
I'm also seeing this issue with several packages. One solution that I have thought of is for there to be an option to hide packages from winget. i.e. if there is a package that I don't want winget to manage and I will manage manually, add it to some exclusion list.
Apart from allowing to set an exclusion list, could detect such cases (or at least the package installation failures) and suggest to the user how to add to the exclusion list. Also could maybe send some info to the author of that package, probably user could opt in to send more info about the environment the issue occurs at. For cases where it thinks it installed it, it's probably harder to detect (unless it added an installation verification option where it would check if the just installed new package version is detected after install)
This is getting super frustrating. Winget keeps saying there are upgrades even after everything has been upgraded.

Notice also that this seems to be happening predominantly with Microsoft packages:

After upgrade:

This issue is primarily caused by packages with versions that install "side-by-side".
As we iterate over the list, we look for upgrades.
If you have version 1 installed and run upgrade, version 2 gets "added".
Then when we iterate over again, we see version 1 and it needs an upgrade even though version 2 is installed.
We're working on a fix to detect if the latest version of a package is already installed to reduce the friction here.
We've improved the logic in WinGet 1.4. I know there are still issues with matching for some packages like Teams and VC Redists.
@birbilis are you still seeing the same packages failing, or have some of them improved?
The following packages will reinstall even though previously marked as successful:
PS ...Sda\Code> winget upgrade --all
Name Id Version Available Source
--------------------------------------------------------------------------------
IrfanView 4.60 (32-bit) IrfanSkiljan.IrfanView 4.60 4.62 winget
Microsoft .NET SDK 6.0.310 (x64) Microsoft.DotNet.SDK.6 6.0.310 6.0.407 winget
In IrfanView's case it's a 32 bit version installed but during the attempt to update a 64 bit installer is ran.
Also for "unknown" packages:
PS ...Sda\Code> winget upgrade --include-unknown --all
Name Id Version Available Source
--------------------------------------------------------------------------------
IrfanView 4.60 (32-bit) IrfanSkiljan.IrfanView 4.60 4.62 winget
WinDirStat 1.1.2 WinDirStat.WinDirStat Unknown 1.1.2 winget
Microsoft .NET SDK 6.0.310 (x64) Microsoft.DotNet.SDK.6 6.0.310 6.0.407 winget
4 upgrades available.
The following packages have an upgrade available, but require explicit targeting for upgrade:
Name Id Version Available Source
-----------------------------------------------------
Zotero DigitalScholar.Zotero 6.0.18 6.0.23 winget
- WinDirStat.
- Zotero. Has been updated to 6.0.23 by opening Zotero directly. However, it keeps wanting to install with the above winget command.
How is Zotero being displayed in Windows Apps & Features? WinGet is looking at the registry key and seeing version "6.0.8" based on the output above. It's possible the installer isn't updating the registry key during the upgrade process.
We've improved the logic in WinGet 1.4
btw, does WinGet itself autoupdate? I see I have 1.4.10173 on that same Win10pro laptop, but not sure if it updated with OS or when I run it last time or something. Tried "winget upgrade winget" with no luck (can't find package). How can one try to get the latest winget (applicable to the current OS/CPU at least) before they do the other upgrades?
This one forces one to respond to confirmation prompt and then shows the VS installer's progress pane: (1/28) Found Visual Studio Community 2022 [Microsoft.VisualStudio.2022.Community] Version 17.5.3
WinGet does not autoupdate, but the Microsoft Store will autoupdate the App Installer (containing WinGet).
This one shows a UAC prompt at some point (should I be running winget from elevated command prompt instead?) (2/28) Found Android Studio [Google.AndroidStudio] Version 2022.1.1.19
This one seems to progress with failure immediately before the user does something on the dialog it shows (even though I used "-h" option for upgrade). I guess if one presses Remove they'll lose the s/w and will need to install it by hand since as the screenshot shows winget continues in the mean time with other packages
Bitvise SSH Client 9.25 (remove only) Bitvise.SSH.Client 9.25 9.27 winget
btw, not sure what the '"remove only" means in its title
@denelon
How is Zotero being displayed in Windows Apps & Features?
It displays as 6.0.18. Same for Control Panel\Programs\Programs and Features.
It's possible the installer isn't updating the registry key during the upgrade process.
Yes that seems plausible.
I haven't rebooted the computer. I'll try that ...
@birbilis
btw, not sure what the '"remove only" means in its title
See #3130
I'm encountering this as well with these applications:
AIDA64 Extreme v6.88- Version:
6.88 - Available:
6.88.6400
- Version:
JetBrains ETW Host Service (x64): #2992- Version:
> 2022.2.2 - Available:
2022.3.3
- Version:
I don't know of any fix and it's polluting my weekly winget upgrade run with updates it already has.
EDIT: For now, I've pinned the packages using #476. This should prevent it from useless reinstalling every time I try to update everything.
I'm experiencing the same issue with Android Studio:
Here are the logs: WinGet-2023-10-23-AndroidStudio.zip
I'm having the repeat-install problem with DotNet 7. Over the past week or so, winget has re-installed it every time I have run winget upgrade --all --include-unknown I tried uninstalling it (via winget), rebooting and re-installing but all to no avail.
I have a list of 20 packages that never get removed from the list even though they were upgraded. Since I've seen this issue for a year and a half, I just ignore the offenders and install by hand the packages that play nice.