DLord Posted April 30, 2023 Share Posted April 30, 2023 If you have Powershell 7 installed on your system, chances are you are also using new release .msi file to update to the new release, when available. Today when I tried to check for available updates using Winget ('winget upgrade' command), I noticed that winget is providing an update for Powershell 7.3.1, while I have Powershell 7.3.4 installed. At first I thought it might be a usual problem with Winget update database, so I tried to investigate the issue further. Running the 'winget list powershell' command I noticed that along the 7.3.4, older version 7.3.1 is also listed as installed on my system. I had to uninstall the 7.3.1, while it should have not existed on my system in the first place. I did update that old version to 7.3.2, 7.3.3, and finally to the current stable version (7.3.4). No other update process ever left the old version installed on the system in such a manner. Either the problem was with the 7.3.2 .msi file that did not correctly get rid of the previous version, or the problem was with the 7.3.1 package itself that left some leftover residue after update. Users are reporting such a problem if they try to update Powershell installed from Microsoft Store with a .msi installer, but this is not the case with my system as I used .msi installers to install/update my Powershell from the begining. While I am interested to know if any of you guys have experienced this problem, perhaps you should also check your system to make sure you do not have such leftovers. I am not sure, but this might be the reason behind slow startup of my Powershell profile, as well as some problem that I had while ago with piping some python script's output to Powershell. Perhaps having 2 versions of Powershell 7 installed side-by-side caused conflicts in my PATH. I would like to find out if this was an isolated issue related to my system or a more widespread problem. Meanwhile I will try to dig dipper in their Github page for more info. Any insight/input to this issue is appreciated. kkwong7878 1 Quote Link to comment Share on other sites More sharing options...
Solution DLord Posted April 30, 2023 Author Solution Share Posted April 30, 2023 (edited) Side note: To those who might be interested, if you are running Winget from Powershell, if there is an update for Powershell, do not update it through that Winget prompt (either by 'winget upgrade powershell xxx' or 'winget upgrade all') because it could result in the running Powershell not being updated correctly. Although it wasn't my case, but since I came across it, I thought it is worth sharing. Edited May 3, 2023 by DLord kkwong7878 1 Quote Link to comment Share on other sites More sharing options...
DLord Posted May 3, 2023 Author Share Posted May 3, 2023 FYI to avoid any such problems, it is best to not run Winget through Powershell or Windows Terminal, as both of them receive updates through Winget. Best practice: Run Winget through CMD. haris_sane69 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.