Skip to content

Broken winget after installing Windows 11 and all its updates #3832

@lackovic

Description

@lackovic

Brief description of your issue

I have installed Windows 11 on a laptop and completed all the system updates. When I tried to run some winget commands like winget search or winget install I got an empty output, though the text color of the prompt would turn blue.

(1) I tried to update winget from the Microsoft Store but there was no Update button under App Installer.

(2) When I tried to uninstall winget and install it back with the command:

Get-AppxPackage | ? {$_.Name -match 'AppInstaller'} | Remove-AppxPackage; Add-AppxPackagehttps://aka.ms/getwinget

I got the following error:

Remove-AppxPackage : Deployment failed with HRESULT: 0x80073CFA, Removal failed. Please contact your software vendor. (Exception fro
m HRESULT: 0x80073CFA)
error 0x80070032: AppX Deployment Remove operation on package Microsoft.DesktopAppInstaller_1.21.2771.0_x64__8wekyb3d8bbwe from: C:\
Program Files\WindowsApps\Microsoft.DesktopAppInstaller_1.21.2771.0_x64__8wekyb3d8bbwe failed. This app is part of Windows and canno
t be uninstalled on a per-user basis. An administrator can attempt to remove the app from the computer using Turn Windows Features o
n or off. However, it may not be possible to uninstall the app.
NOTE: For additional information, look for [ActivityId] 88ce017c-0b27-000b-0340-cf88270bda01 in the Event Log or use the command lin
e Get-AppPackageLog -ActivityID 88ce017c-0b27-000b-0340-cf88270bda01
At line:1 char:55
+ ... kage | ? {$_.Name -match 'AppInstaller'} | Remove-AppxPackage; Add-Ap ...
+                                                ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (Microsoft.Deskt...__8wekyb3d8bbwe:String) [Remove-AppxPackage], IOException
    + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand

Add-AppxPackagehttps://aka.ms/getwinget : The term 'Add-AppxPackagehttps://aka.ms/getwinget' is not recognized as the name of a cmdl
et, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is c
orrect and try again.
At line:1 char:75
+ ... aller'} | Remove-AppxPackage; Add-AppxPackagehttps://aka.ms/getwinget
+                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                              + CategoryInfo          : ObjectNotFound: (Add-AppxPackagehttps://aka.ms/getwinget:String) [], CommandNotFoundException              + FullyQualifiedErrorId : CommandNotFoundException  

(3) When I ran:

winget source update

I got:

Updating all sources...
Updating source: msstore...
Done
Updating source: winget...
  ██████████████████████████████  100%
Done

and then winget started working.

Steps to reproduce

Install Windows 11 on a computer and install all the updates.

Expected behavior

winget is working.

Actual behavior

winget is not working.

Environment

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

Windows: Windows.Desktop v10.0.22621.2506
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.21.2771.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIt either shouldn't be doing this or needs an investigation.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions