Is it safe to uninstall Chocolatey?

Is it safe to uninstall Chocolatey after I have installed applications with it?

I want to set up software for new PCs using Chocolatey, but want to remove the C:\Chocolatey folder. As far as I understand Chocolatey uses the native installers, so the programs appear in "Add and remove programs" of Windows and can be maintained that way. Chocolatey seems not needed any more by the user.


Solution 1:

As a general rule of thumb, yes, it is "safe" to uninstall Chocolatey. Chocolatey, for the most part, is simply a wrapper around the native EXE/MSI for the application that is being installed. As a result, removing Chocolatey, does not remove the installed applications.

There are some types of Applications, for instance, Command Line/Portable ones, that will have an adverse effect by removing Chocolatey, so you may want to take some care here. For instance, when installing say GitVersion.Portable, Chocolatey adds a "shortcut" to the resulting EXE in the Chocolatey bin folder (which is on the system path). By uninstalling Chocolatey, this "shortcut" and potentially the EXE itself, will be removed, so this application will no longer function.

I would suggest that you take a look at the Chocolatey\Lib folder, and see which packages you have installed with Chocolatey before uninstalling, so that you can verify that no applications fall into this category.

Hope that helps!

The steps to uninstall Chocolatey are listed here.

As a side note, starting with Chocolatey 0.9.8.27, the default Chocolatey Path is no longer C:\Chocolatey, but rather C:\ProgramData\Chocolatey.

Solution 2:

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 on your system, you don't have to worry that it cluttered up your registry (the applications that you installed with Chocolatey or manually, now that's a different story).

A different story indeed, as i don't recall seeing the Atom editor in my Windows installed programs list. I've uninstalled that via a command line (ran as administrator):

cuninst atom

And the no registry part is actually false. On Windows 7, i had to do this:

reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /f /v ChocolateyInstall

On other versions it might be this:

reg delete HKLM\Environment /f /v ChocolateyInstall

To remove the folder from the command line, use this:

rmdir /Q /S C:\ProgramData\chocolatey

Or this, if you use or upgraded from Chocolatey < 0.9.8.27:

rmdir /Q /S C:\Chocolatey

After all that, the normal Start menu shortcut to C:\ProgramData\chocolatey\lib\Atom.0.141.0\tools\Atom\atom.exe was still present, but when used Windows asks whether you wish to delete it.