You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Installing PowerShell 7.0.0 GA removed my PS 6 install #12002
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-No ActivityIssue has had no activity for 6 months or more
I lost everything in /Program Files/PowerShell/6, 6.0.4, and 6-preview. Launching PowerShell 6.2.4 in the Windows Terminal resulted in "[error 0x80070002 when launching 'C:\Program Files\PowerShell\6\pwsh.exe'].
For anyone who comes across this, you can keep your 6 install side-by-side by just copying the PowerShell\6 folder somewhere else prior to installing 7. Doesn't help if you've already lost your 6 install though :(.
It's fine for there to only be one 'main' version advertised by GitHub or by installation scripts, but we still have a use for 6, why does it need to remove 6 on my local system when they run fine as separate executables?
Looks like I missed some team discussion on this or forgot about it. Anyways, the official answer is that PS7 is expected to be an update over PS6. So the current behavior is by-design. We'll make sure docs call it out explicitly.
Reacted by Joey Aiello and Thom A
Reacted by Keith Hill, Dave Kaylor, Jake Morrison, amay077 and Thomas Nieto
I am fine with the $env:path getting cleared so you only get the latest when you run pwsh. But I don't think it should remove the 6 files. Any place we have a full path specified will be broken.
This makes the install of 7 over 6 a dangerous upgrade that can break things even if it would have been compatible. We have been preaching the side by side nature of PowerShell to the community for a while now and deleting those files breaks that promise.
Reacted by Dave Kaylor, Keith Hill, Thom A, Jake Morrison, Sam Smith, Thomas Nieto and Patrick Meinecke
The MSI could have been designed with SxS as an option.
This will lead to bugs. PowerShell depends on some environment variables, which constantly leads to problems of coexistence, but the MSFT team is not yet ready to abandon these dependencies.
This makes the install of 7 over 6 a dangerous upgrade that can break things even if it would have been compatible. We have been preaching the side by side nature of PowerShell to the community for a while now and deleting those files breaks that promise.
From a code perspective, it's no more dangerous than us doing an in-place upgrade from 6.0 to 6.1 and then again to 6.2 (which we did do). The trade off here was against having a dangling 6.2 on your box that's out of support in <6 months and can't be upgraded to a supported, serviceable state.
I hear everyone that we could have communicated better, and I can add some of this language to my announcement blog if folks think it would be helpful as a call out there.
Reacted by Dave Kaylor and Rain Sallow (/u/ta11ow)
The trade off here was against having a dangling 6.2 on your box that's out of support in <6 months and can't be upgraded to a supported, serviceable state.
FWIW this happened to me. Had 6.0.2 on my box and didn't realise for a year until I picked it up as a bug when writing this.
Perhaps an MSI installer flag should be added that allows the customer to "KeepExistingPwshVersions"?
Then customers can decide at install time whether they want previous versions removed or not.
Reacted by tommymaynard, Dave Kaylor, Rain Sallow (/u/ta11ow), Jake Morrison, Thomas Nieto and Keith Hill
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commented on Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commented on Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-No ActivityIssue has had no activity for 6 months or more
Activity
KaylorDave commentedon Mar 4, 2020
Seconding this, I was rather surprised when my PowerShell 6 install was removed.
rkeithhill commentedon Mar 4, 2020
Same here. Hmm...
tommymaynard commentedon Mar 4, 2020
I lost everything in
/Program Files/PowerShell/6,6.0.4, and6-preview. Launching PowerShell 6.2.4 in the Windows Terminal resulted in"[error 0x80070002 when launching 'C:\Program Files\PowerShell\6\pwsh.exe'].KaylorDave commentedon Mar 4, 2020
For anyone who comes across this, you can keep your 6 install side-by-side by just copying the PowerShell\6 folder somewhere else prior to installing 7. Doesn't help if you've already lost your 6 install though :(.
techthoughts2 commentedon Mar 4, 2020
Same. While excited for 7 we will have use for PowerShell 6 for some time. Wasn't expecting it to be removed.
SteveL-MSFT commentedon Mar 4, 2020
Checking on this
iSazonov commentedon Mar 4, 2020
It was discussed long time ago and it is by design because we can have only single "main" version.
rkeithhill commentedon Mar 4, 2020
Not sure that makes sense. What is the point then of installing into versioned directories:
6and7?KaylorDave commentedon Mar 4, 2020
It's fine for there to only be one 'main' version advertised by GitHub or by installation scripts, but we still have a use for 6, why does it need to remove 6 on my local system when they run fine as separate executables?
iSazonov commentedon Mar 4, 2020
Because it is design for MSI installer. If you want install 7.0 as SxS you must use ZIP package.
I won’t be surprised if this is in the documentation.
SteveL-MSFT commentedon Mar 4, 2020
Looks like I missed some team discussion on this or forgot about it. Anyways, the official answer is that PS7 is expected to be an update over PS6. So the current behavior is by-design. We'll make sure docs call it out explicitly.
KevinMarquette commentedon Mar 4, 2020
I am fine with the
$env:pathgetting cleared so you only get the latest when you run pwsh. But I don't think it should remove the 6 files. Any place we have a full path specified will be broken.This makes the install of 7 over 6 a dangerous upgrade that can break things even if it would have been compatible. We have been preaching the side by side nature of PowerShell to the community for a while now and deleting those files breaks that promise.
KaylorDave commentedon Mar 4, 2020
The MSI could have been designed with SxS as an option. Or it could have warned that it was going to remove 6.x versions.
iSazonov commentedon Mar 4, 2020
Please see PowerShell Committee conclution PowerShell/PowerShell-RFC#202 (comment)
3 remaining items
iSazonov commentedon Mar 4, 2020
This will lead to bugs. PowerShell depends on some environment variables, which constantly leads to problems of coexistence, but the MSFT team is not yet ready to abandon these dependencies.
iSazonov commentedon Mar 4, 2020
And having the same experience on all platforms is very good UX.
joeyaiello commentedon Mar 4, 2020
From a code perspective, it's no more dangerous than us doing an in-place upgrade from 6.0 to 6.1 and then again to 6.2 (which we did do). The trade off here was against having a dangling 6.2 on your box that's out of support in <6 months and can't be upgraded to a supported, serviceable state.
I hear everyone that we could have communicated better, and I can add some of this language to my announcement blog if folks think it would be helpful as a call out there.
rjmholt commentedon Mar 4, 2020
FWIW this happened to me. Had 6.0.2 on my box and didn't realise for a year until I picked it up as a bug when writing this.
austoonz commentedon Mar 4, 2020
Perhaps an MSI installer flag should be added that allows the customer to "KeepExistingPwshVersions"?
Then customers can decide at install time whether they want previous versions removed or not.
jckenny commentedon Mar 6, 2020
Will PowerShell 8 automatically remove 7 when that is released or will 7 not be touched because it is a long term support release?
iSazonov commentedon Mar 6, 2020
For next version numbering #12057
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 23, 2023
This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.