How to uninstall
How to uninstall
Uninstalling Chocolatey
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). 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).
Folder
Most of Chocolatey is contained in C:\ProgramData\chocolatey
or whatever $env:ChocolateyInstall
evaluates to. You can simply delete that folder.
NOTE
You might first back up the sub-folders
lib
andbin
just in case you find undesirable results in removing Chocolatey. 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. Having a backup will allow you to test that aspect out.
Environment Variables
There are some environment variables that need to be adjusted or removed.
- ChocolateyInstall
- ChocolateyToolsLocation
- ChocolateyLastPathUpdate
- PATH (will need updated to remove)
Script
There are no warranties on this script whatsoever, but here is something you can try:
WARNING
This will remove Chocolatey and all packages, software, and configurations in the Chocolatey Installation folder from your machine. Everything will be GONE. This is very destructive. DO NOT RUN this script unless you completely understand what the intention of this script is and are good with it. If you mess something up, we cannot help you fix it.
WARNING
Seriously, this script may destroy your machine and require a rebuild. It may have varied results on different machines in the same environment. Think twice before running this.
Click the red button below to reveal the uninstall scripts.
If you also intend to delete the Chocolatey directory, remove the -WhatIf
switch from the Remove-Item
call near the bottom:
Additionally, the below code will remove the environment variables pointing to the tools directory that was managed by Chocolatey.
If you want to remove the actual directory from disk, remove the -WhatIf
switch from the Remove-Item
call below as well.