I’m flummoxed. I just upgraded PowerShell from version 184.108.40.206 to 220.127.116.11. It’s the latest stable version, as you can plainly see at GitHub. But even after updating, that preceding version still shows up using winget list powershell. An explicit uninstall request reports “No installed package found matching input criteria.” Hmm; WTF? I can only call this a PowerShell update oddity version confusion problem!
If you look at the left-hand tab in the lead-in graphic, you’ll see two versions of Powershell, one numbered 18.104.22.168 and the other 22.214.171.124. But when I try to uninstall the older one, winget can’t find it. And indeed when I try to open it in the right-hand tab, it comes up at the current (latest) version. I’ve seen something like this before, so I start thinking about causes and workarounds. Read on to see how I resolved this one…
Resolving PowerShell Update Oddity Version Confusion
I’m of the school that says if you can’t do it one way in Windows, you can almost always find another. If I poke around in my file system searching on “pwsh.exe” (the name of the powershell executable file), I see an app-based instance of the 126.96.36.199 version in ProgramFiles\WindowsApps. And sure enough, inside Settings → Apps, I find three (count ’em) versions of PowerShell. Here’s a snap:
AFAIK, I only need the middle one, so I right-click to uninstall the other two. When I’m done, I check Windows Terminal, and it tells me I need to reset my default profile. I do, and choose version 188.8.131.52. When I open a new Terminal window and run winget list powershell again, it shows only a single (and correct) version. Problem solved!
Now, all I have to do is figure out why the winget uninstall didn’t work, but a manual uninstall inside the Apps widget in Settings did the trick. I’m gonna have to think about that for a while… Stay tuned!