I'm trying to use winget to manage my PowerShell installation, but even though it recognizes PowerShell is installed, I'm having issues upgrading it. When I run the command to update, it shows an available update for PowerShell, but when I specifically try to update it with the `--id` option, it says there's no installed package found. Here's what I see when I run the update command:
```plaintext
C:Usersmikeblas>winget update
Name Id Version Available Source
-----------------------------------------------------------------------------------
Microsoft Edge Microsoft.Edge 138.0.3351.55 138.0.3351.65 winget
PowerShell 7.5.1.0-x64 Microsoft.PowerShell 7.5.1.0 7.5.2.0 winget
Windows Terminal Microsoft.WindowsTerminal 1.22.11141.0 1.22.11751.0 winget
3 upgrades available.
C:Usersmikeblas>winget update --id Microsoft.PowerShell
No installed package found matching input criteria.
C:Usersmikeblas>```
3 Answers
Looks like upgrading PowerShell through winget has had issues for a while. The most reliable method I've found is to uninstall your current version and then reinstall it using winget. That way, you can avoid any problems with the update process.
Have you tried running `winget update --all`? That might catch PowerShell in the update process if it's available for a wider update.
I did try that, but I wasn't sure what to expect since it seemed too broad.
If you used a different method to install PowerShell (like an MSI or EXE), you'll need to uninstall that version first. After that, reinstall PowerShell with winget, and then you should be able to perform updates through it smoothly.
Yeah, I had a similar issue. I ended up reinstalling using winget, and it worked for me without any hiccups.