Jump to content

Powershell 7.3.1 not updated correctly


DLord
Go to solution Solved by DLord,

Recommended Posts

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. :notworthy:

Link to comment
Share on other sites


  • Solution

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 by DLord
Link to comment
Share on other sites


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.

  • Like 1
Link to comment
Share on other sites


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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...