How to resolve winget is unable to find or install packages
Windows Package Manager (winget
) is a command-line utility designed by Microsoft to help users
discover, install, upgrade, and remove software on Windows systems.
If you're setting up a new Windows installation, you may encounter issues with Windows Package
Manager (winget
) not finding or installing packages. This issue is due to the default version of
winget
that ships with Windows being outdated, and it can't automatically update if you're not
signed into or able to access the Microsoft Store.
1winget search --id Microsoft.PowerShell --source winget
According to the following post, this issue first occurred in September 2023.
To resolve this issue, follow these steps using PowerShell to update winget
:
-
Open PowerShell.
-
Execute the following command to download the latest version of
winget
:1Invoke-WebRequest -Uri https://aka.ms/getwinget -OutFile $HOME/Downloads/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle
-
Install the downloaded package:
1Add-AppxPackage -Path $HOME/Downloads/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle
These steps ensure winget
is updated and fully functional on your Windows system.
1winget search --id Microsoft.PowerShell --source winget
Summary
In this article, you've learned how to update Windows Package Manager (winget
) on a new
installation of Windows to resolve issues with it finding and installing packages.