winget-cli: v1.7.10582 `upgrade --all` fails without any errors or output

Instructions on how to reset Winget: https://github.com/microsoft/winget-cli/issues/4219#issuecomment-1975125826

Brief description of your issue

winget upgrade --silent --all suddenly fails on my system. Winget v1.7.10582.

I notice that the logs are spammed with attempting to open pinning database, last line says [REPO] Did not find a Version for { 6.0.27 }.

So maybe related to pinning? And maybe related to:

Winget output:

Click to view
C:\Windows\System32>winget upgrade --silent --all --verbose-logs
Name                                 Id                        Version Available Source
---------------------------------------------------------------------------------------
Signal 6.48.1                        OpenWhisperSystems.Signal 6.48.1  7.0.0     winget
ONLYOFFICE Desktop Editors 8.0 (x64) ONLYOFFICE.DesktopEditors < 8.0.1 8.0.1     winget
Oh My Posh version 19.11.6           JanDeDobbeleer.OhMyPosh   19.11.6 19.11.7   winget
4 upgrades available.

The following packages have an upgrade available, but require explicit targeting for upgrade:
Name    Id              Version  Available Source
-------------------------------------------------
Discord Discord.Discord 1.0.9017 1.0.9034  winget
1 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
2 package(s) have pins that prevent upgrade. Use the 'winget pin' command to view and edit pins. Using the --include-pinned argument may show more results.

C:\Windows\System32>

Logs (--verbose-logs):

WinGet-2024-02-29-23-02-41.049.log

Steps to reproduce

winget upgrade --all

Expected behavior

Should upgrade all upgradable packages. If it fails it should throw an error.

Actual behavior

No packages get updated, no errors are thrown.

Environment

Windows Package Manager v1.7.10582
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.3155
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.10582.0

Winget Directories                 
-----------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
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

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 Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled

About this issue

  • Original URL
  • State: closed
  • Created 4 months ago
  • Reactions: 9
  • Comments: 27 (4 by maintainers)

Most upvoted comments

@raphael-zenhaeusern-legic

Try to reset Winget? With PowerShell:

Get-AppxPackage -Name 'Microsoft.DesktopAppInstaller' | Reset-AppxPackage

How to reset Winget

[!NOTE] This will reset all Winget settings.

[!WARNING] Use Windows PowerShell 5.1 (powershell.exe), not PowerShell Core (pwsh.exe).

How to find what Windows build you’re on

Open run prompt, CMD, pwsh or PowerShell. Type winver and press enter.

Click to view image

Or use winget --info, it will list Windows build.

Click to view image

If on Windows 11 (build >= 20215)

# After Windows insider build 20215
Get-AppxPackage -Name 'Microsoft.DesktopAppInstaller' | Reset-AppxPackage

If on Windows 10 (build < 20215)

# Before Windows insider build 20215
## Get app in question
$App = Get-AppxPackage -Name 'Microsoft.DesktopAppInstaller'

## Delete app data
$AppDataDir = [string] [System.IO.Path]::Combine(
    [System.Environment]::GetFolderPath('LocalApplicationData'),
    'Packages',
    $App.'PackageFamilyName'
)
[System.IO.Directory]::GetDirectories($AppDataDir).ForEach{
    $null = [System.IO.Directory]::Delete($_,$true)
}

## Re-register / reinstall application
Add-AppxPackage -DisableDevelopmentMode -Register -Path (
    [System.IO.Path]::Combine($App.'InstallLocation','appxmanifest.xml')
)

https://github.com/microsoft/winget-cli/releases/tag/v1.7.10661

We’re flighting to Windows Insider Beta and Windows Insider Release Preview. If all goes well we will release as stable early next week, but you can try it out now.

Hey everyone, We’ve got a fix coming with a new release.

Had the same reported issue for showing packages but doing nothing

winget upgrade --all

This fixed it 🎉

Get-AppxPackage -Name 'Microsoft.DesktopAppInstaller' | Reset-AppxPackage

@raphael-zenhaeusern-legic

Try to reset Winget? With PowerShell:

Get-AppxPackage -Name 'Microsoft.DesktopAppInstaller' | Reset-AppxPackage

I ran into this yesterday on one computer, and again today on another computer. Checked the logs and it had a bunch of repeating errors opening the pinning database.

2024-03-01 15:40:51.859 [REPO] ... opening existing pinning database
2024-03-01 15:40:51.859 [REPO] Opening database for Read at 'C:\Users\<redacted>\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\pinning.db'
2024-03-01 15:40:51.859 [REPO] Opened Pinning Index with version [1.0], last write [2023-07-11 15:54:59.000]
2024-03-01 15:40:51.859 [CLI ] Terminating context: 0x8a15002b at C:\__w\1\s\external\pkg\src\AppInstallerCLICore\Workflows\UpdateFlow.cpp:bc

I deleted the pinning.db, and that didn’t change anything.

Then I tried resetting the packaged as show above, and that solved the problem.

Update --all now installs the listed updates. Thanks!

Ran into the same issue today, too. I’m also on version 1.7.10582. Deleting the pinning.db did not work.

However, doing a Reset-AppxPackage as above did.

https://github.com/microsoft/winget-cli/releases/tag/v1.7.10661 is now marked as the stable release at GitHub and it’s being published to the Microsoft Store for those getting automatic updates.

How to reset Winget

thanks, resetting fixed the issue!

Windows 11 (build >= 20215)

that one worked for me, thank you 🙏