$agentService = Get-Service -Name chocolatey-agent -ErrorAction Silentl圜ontinue # Adapt for any services running in subfolders of ChocolateyInstall $machineKey.SetValue('PATH', $newMachinePATH, 'ExpandString') # This issue exists in ALL released versions of. # NEVER use ::SetEnvironmentVariable() for PATH values see If (-not (Test-Path $env:ChocolateyInstall)) "Chocolatey is not detected as installed. $message = ChocolateyInstall environment variable was not found." If you also intend to delete the Chocolatey directory, remove the -WhatIf switch from the Remove-Item call near the bottom: $VerbosePreference = 'Continue' Yes, I understand the dangers of running these scripts Think twice before running this.Ĭlick the red button below to reveal the uninstall scripts. It may have varied results on different machines in the same environment. Seriously, this script may destroy your machine and require a rebuild. If you mess something up, we cannot help you fix it. DO NOT RUN this script unless you completely understand what the intention of this script is and are good with it. This will remove Chocolatey and all packages, software, and configurations in the Chocolatey Installation folder from your machine. There are no warranties on this script whatsoever, but here is something you can try: There are some environment variables that need to be adjusted or removed. Having a backup will allow you to test that aspect out. Bear in mind not every Chocolatey package is an installer package, there may be some non-installed applications contained in these subfolders that could potentially go missing. You might first back up the sub-folders lib and bin just in case you find undesirable results in removing Chocolatey. Most of Chocolatey is contained in C:\ProgramData\chocolatey or whatever $env:ChocolateyInstall evaluates to. Since it is not actually installed in Programs and Features, you don't have to worry that it cluttered up your registry (however that's a different story for the applications that you installed with Chocolatey or manually). Should you decide you don't like Chocolatey, you can uninstall it simply by removing the folder (and the environment variable(s) that it creates).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |