Skip to content

can't reinstall

When I execute choco install powershell-core --reinstall, the script just exists and does not reinstall:

PS C:\Users\PC> sudo choco install powershell-core --force
Chocolatey v2.3.0
Installing the following packages:
powershell-core
By installing, you accept licenses for the packages.
powershell-core v7.4.5 already installed. Forcing reinstall of version '7.4.5'.
 Please use upgrade if you meant to upgrade to a new version.
Downloading package from source 'https://community.chocolatey.org/api/v2/'
Progress: Downloading powershell-core 7.4.5... 100%

powershell-core v7.4.5 (forced) [Approved]
powershell-core package files install completed. Performing other installation steps.
The package powershell-core wants to run 'chocolateyinstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider:
choco feature enable -n allowGlobalConfirmation
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): y
7.4.5
The version of PowerShell in this package (7.4.5) is already installed by another means, marking package as installed
 The install of powershell-core was successful.
  Software install location not explicitly set, it could be in package or
  default install location of installer.

Chocolatey installed 1/1 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).