winget-cli
winget-cli copied to clipboard
Winget does not update
Brief description of your issue
Hi,
I am currently have winget installed on my machine and it does not update, when a full package update (aka winget update --all) is executed. Interestingly my winget installation breaks fairly regularly.
Steps to reproduce
Local user:
PS C:\Users\Max> winget update --all
Failed in attempting to update the source: winget
No installed package found matching input criteria.
Super user rights:
PS C:\Windows\System32> winget update --all
No installed package found matching input criteria.
I have tried the following commands to fix the behavior:
winget source reset --force
Furthermore, I have reinstalled winget multiple times and updated the App Installer package to the most recent version.
Expected behavior
Winget installs most recent updates from msstore and winget update database.
Actual behavior
Winget does not update.
Environment
Windows Package Manager v1.7.11132
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.19045.4355
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.11132.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
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Open similar issues:
- Failed in attempting to update the source: winget (#3525), similarity score: 0.80
Closed similar issues:
- error running winget (#3098), similarity score: 0.81
- Failed in attempting to update the source: winget (#3001), similarity score: 0.80
- winget client issue, source update failed (#3691), similarity score: 0.80
- Update Error 0x801901ad winget source not configured (#3707), similarity score: 0.78
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Comment: https://github.com/microsoft/winget-cli/issues/3525#issuecomment-1736846054 helped
Thanks @HenkPoley
What resolved "Failed in attempting to update the source: winget" for me:
Download this file: https://cdn.winget.microsoft.com/cache/source.msix (e.g. with Edge) Open the Downloads folder Right-click, choose install, follow the wizard to install the package. No clue why this is necessary. Source list remains the same:
PS C:> winget source list Name Argument
msstore https://storeedgefd.dsx.mp.microsoft.com/v9.0 winget https://cdn.winget.microsoft.com/cache Yes, I did run the command mention at the top here: https://github.com/microsoft/winget-cli/issues/3652#issue-1907725867
But I was running a more recent version anyways (1.5? 1.6.??).
This fix can be automated, and thus winget could be self healing if it performed this action upon seeing that error:
Invoke-WebRequest -Uri https://cdn.winget.microsoft.com/cache/source.msix -OutFile $env:TEMP\source.msix
Add-AppxPackage $env:TEMP\source.msix
@A9G-Data-Droid Yeah, Adam, that would be a good feature to have indeed.