Remove K2 Installation
You may need to uninstall your K2 environment. Re-run the Setup Manager to remove K2.
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:
- Ensure that all K2 related processes, such as K2 Server service, are shut down.
- 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.
- Follow the on-screen prompts to complete the wizard.
- 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:
- 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.
- The SourceCode assemblies remain in the Global Assembly Cache (GAC). Delete all SourceCode assemblies from the C:\Windows\Assembly folder.
- The SourceCode registry key remains after uninstall. Delete the registry key located at HKEY_LOCAL_MACHINE > SOFTWARE > SourceCode.
- The K2 folder structure remains. Delete the folder located at C:\Program Files\K2 (this may differ depending on your installation location)
- 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.
- 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:
- Make sure no K2 Databases are present on the SQL Server.
- Make sure the K2 menu items are not present under Start > Programs.
- Make sure no K2 components are present in Add / Remove programs (Start > Control Panel > Add /Remove Programs).
- Make sure no SourceCode nodes are present in the machine.config file.
- Make sure no SourceCode assemblies are in the GAC (C:\Windows\Assembly).
- 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.