Winget Upgrade May Require Cleanup

Winget Upgrade May Require Cleanup

OK, then: yesterday dev lead Demetrius Nelson and his Winget team pushed an upgrade to winget. This comes courtesy of the Microsoft Store, and shows up as part of the App Installer and/or Windows Terminal packages. I noticed also that winget would occasionally throw the error “Failed in attempting to update the source: winget” as you can see in the lead-in screencap. What made it interesting was that it happens on some, but not all, of my Windows PCs. Now, let me explain why this post says that the “Winget upgrade may require cleanup.”

Why Say: Winget Upgrade May Require Cleanup?

When I saw this pop up in the wake of the new release, I figured the changes involved in pushing it out the door might have been involved. So I contacted Mr. Nelson and sent him (among other info) the screencap that leads this piece off. He responded this morning and explained how I could fix the issue, using the commands:

winget uninstall Microsoft.Winget.Source_8wekyb3d8bbwe
winget source reset --force

The first string removes the winget package from the PC. The second resets the winget environment, which is why the user must agree to Terms again before winget will run. After that it shows no upgrades are available (“No installed package found matching input criteria” with no accompanying error message (“Failed in attempting to update the source: winget”).

Problem solved; case closed. It’s always good to get the fix right from the source. Had to laugh about the “It won’t break while the engineer is watching” comment he sent me, too. Isn’t that just the way things go in Windows-World (and elsewhere in life)? LOL

See the whole thing here:

The fix is in — and working! Good stuff…

Facebooklinkedin
Facebooklinkedin

7 thoughts on “Winget Upgrade May Require Cleanup”

  1. Hello,
    my “winget” (on Windows 10) fails with this command:
    >winget upgrade

    I have tried your above written commands
    winget uninstall Microsoft.Winget.Source_8wekyb3d8bbwe
    –> Successfully uninstalled
    winget source reset –force
    –> Resetting all sources…Done

    Repeating the first command results in:
    PS C:\> winget upgrade
    Failed in attempting to update the source: winget
    The `msstore` source requires that you view the following agreements before using.
    Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction
    The source requires the current machine’s 2-letter geographic region to be sent to the backend service to function properly (ex. “US”).
    Do you agree to all the source agreements terms?
    [Y] Yes [N] No: y (answered “y”)
    Failed when searching source; results will not be included: winget
    No installed package found matching input criteria.
    PS C:\> winget update
    Failed in attempting to update the source: winget
    Failed when searching source; results will not be included: winget
    No installed package found matching input criteria.

    My notes:
    1) I have installed winget as a part of Windows Apps.
    2) I do not know how to send my geographic region “cs” to the above mentioned “backend service”.
    Please, help me. Thank you.
    Tovim

    1. This turns out to be a documented problem with some recent releases. If you keep applying upgrades (or let the MS Store handle them for you) this will eventually fix itself. I am running all versions of Windows 10 and all versions of 11 except for Dev Channel and winget is back to working on all of them. Stick with it: it will get fixed!
      Thanks for your comment & HTH,
      –Ed–

    2. In case you haven’t sorted it Tovim I put this little flow together for you, save and run it as a .ps1 file;

      function Repair-Winget {
      If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] “Administrator”)) {
      Start-Process pwsh -Verb RunAs -ArgumentList “-NoExit”, “-Command &{cd ‘$(Get-Location)’;
      winget uninstall ‘Microsoft.Winget.Source_8wekyb3d8bbwe’; Set-WinUserLanguageList en-US;
      winget source reset –force;winget upgrade}”
      }} Repair-Winget

  2. Awesome !! From:

    Failed when opening source(s); try the ‘source reset’ command if the problem persists.
    An unexpected error occurred while executing the command:
    0x8a15000b : The configured source information is corrupt

    to

    Successfully Upgrade via winget !!!!

Leave a Reply

Your email address will not be published. Required fields are marked *