Remove K2 Installation

You may need to uninstall your K2 environment. Re-run the Setup Manager to remove K2.

When uninstalling K2 components from your environment it is very important to follow the specified order of events, to ensure a successful removal of all K2 components.
Removing a K2 server from a farm does not remove references to that node in the K2 database. The farm will continue to poll the removed node in the server cluster. Contact support to remove all references to the node in the K2 database.

How to Uninstall K2

Removing K2 is essentially a reversal of the installation and configuration process. The K2 Setup Manager will identify the components installed and remove them from the target system.

Removing Components

If you have installed K2 in a distributed environment, uninstall all client components first. Then uninstall the server components.

Uninstalling steps:

  1. Ensure that all K2 related processes, such as K2 Server service, are shut down.
  2. Run the K2 Setup Manager ("%PROGRAMFILES%\K2\Setup\Setup.exe" or browse to Start > All Programs > K2 > K2 Setup Manager) and select the Remove K2 option.
  3. Follow the on-screen prompts to complete the wizard.
  4. Reboot after the uninstall.

Manual Environment Clean Up

After uninstalling the K2 components, there are some manual steps to clean up the environment. They are as follows:

Your folder directories may differ from those listed below based on your installation location or if you are running on 32-bit or 64-bit operating system.
  1. The K2 menu item is left in the Start menu after the uninstall. Delete this menu item by right-clicking the Start menu and selecting Explore / Open All Users. Then browse to Programs folder and delete the K2 folder.
  2. The SourceCode assemblies remain in the Global Assembly Cache (GAC). Delete all SourceCode assemblies from the C:\Windows\Assembly folder.
  3. The SourceCode registry key remains after uninstall. Delete the registry key located at HKEY_LOCAL_MACHINE > SOFTWARE > SourceCode.
  4. The K2 folder structure remains. Delete the folder located at C:\Program Files\K2 (this may differ depending on your installation location)
  5. The database remains in SQL Server, which means data is preserved. To restore the server to a clean state, delete the K2 database. If you need to preserve process or logged information, make a backup copy before deleting the databases.
  6. The machine.config file has remaining SourceCode entries. Edit the machine.config file, located at C:\Windows\Microsoft.NET\Framework\v2.0.50727\config, and remove all sections that mention SourceCode, including the <sourcecode.configuration> node. Be sure to save your changes to the file.

Validating the Uninstall

After uninstalling K2 and performing the manual steps, reboot the machine. Then ensure the environment does not have any K2-related components left. Use the checklist below:

  1. Make sure no K2 Databases are present on the SQL Server.
  2. Make sure the K2 menu items are not present under Start > Programs.
  3. Make sure no K2 components are present in Add / Remove programs (Start > Control Panel > Add /Remove Programs).
  4. Make sure no SourceCode nodes are present in the machine.config file.
  5. Make sure no SourceCode assemblies are in the GAC (C:\Windows\Assembly).
  6. Make sure no K2 folder is located under Program Files.

Considerations

  • When uninstalling K2 components from your environment you must follow the specified order of events to ensure a successful removal of all K2 components.
  • Uninstalling K2 will remove all components from the target system. If you want to remove just a single component, select the Modify K2 option from the Setup Manager.
  • If the components are being removed from a distributed environment, then removing the components from the target system may cause issues in the associated environment /s. There are several manual clean up steps to ensure the environment works properly, as already shown in the sections above, be sure to follow them closely.
  • If you have multiple K2 servers in a distributed installation and uninstall one of them, the remaining K2 servers in the farm may raise errors such as "cannot connect to [name of uninstalled server]". This error resolves automatically after a few minutes as background processes disable the uninstalled server’s entry in the server table.