Message while installing chocolatey

Viewed 17820

i am installing Chocolatey on my computer by using powershell,but when i type this command on powershell as an admin:

Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

I get this message:

An existing Chocolatey installation was detected. Installation will not continue.
For security reasons, this script will not overwrite existing installations.

Please use choco upgrade chocolatey to handle upgrades of Chocolatey itself.

I don't understand why it said there is an existing chocolatey installation,how should i fix it and keep installing chocolatey on my computer?

3 Answers

I ran into this today, on a system that apparently had a borked Chocolatey installation. This worked for me; your mileage may vary:

Remove-Item C:\ProgramData\chocolatey -Recurse

Then run the Chocolatey installation command again. Hope that's helpful!

I deleted manually C:\ProgramData\chocolatey directory then launched the command again

deleting the root folder also helped me, but one of the challenges I encountered was finding the \ProgramData under the C: folder. In my case, the folder was hidden so if you find yourself in this situation. Go to LocalDisk, Click view then mark the Hidden items all hidden will show then you can now see the \ProgramData folder. Hope this help.arrows

Related