Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Message while installing chocolatey

Tags:

chocolatey

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?

like image 710
bassouat Avatar asked Feb 12 '21 06:02

bassouat


2 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!

like image 196
Monyker Avatar answered Sep 19 '22 09:09

Monyker


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

like image 22
elie Avatar answered Sep 23 '22 09:09

elie