Chapter 7. Uninstalling CodeReady Workspaces This section describes uninstallation procedures for Red Hat CodeReady Workspaces installed on OpenShift. The uninstallation process leads to a complete removal of CodeReady Workspaces-related user data. The appropriate uninstallation method depends on what method was used to install the CodeReady Workspaces instance. For CodeReady Workspaces installed using OperatorHub, see Section 7.1, "Uninstalling CodeReady Workspaces after OperatorHub installation" . For CodeReady Workspaces installed using crwctl, see Section 7.2, "Uninstalling CodeReady Workspaces after crwctl installation" 7.1. Uninstalling CodeReady Workspaces after OperatorHub installation Users have two options for uninstalling CodeReady Workspaces from an OpenShift cluster. The following sections describe the following methods: Using the OpenShift Administrator Perspective web UI Using oc commands from the terminal 7.1.1. Uninstalling CodeReady Workspaces using the OpenShift web console This section describes how to uninstall CodeReady Workspaces from a cluster using the OpenShift Administrator Perspective main menu. Prerequisites CodeReady Workspaces was installed on an OpenShift cluster using OperatorHub. Procedure: deleting the CodeReady Workspaces deployment Open the OpenShift web console. Navigate to the Operators > Installed Operators section. Click Red Hat CodeReady Workspaces in the list of installed operators. Navigate to the Red Hat CodeReady Workspaces Cluster tab. In the row that displays information about the specific CodeReady Workspaces cluster, delete the CodeReady Workspaces Cluster deployment using the drop-down menu illustrated as three horizontal dots situated on the right side of the screen. Alternatively, delete the CodeReady Workspaces deployment by clicking the displayed Red Hat CodeReady Workspaces Cluster, red-hat-codeready-workspaces , and select the Delete cluster option in the Actions drop-down menu on the top right. Procedure: deleting the CodeReady Workspaces Operator Open the OpenShift web console. Navigate to the Operators > Installed Operators section in OpenShift Developer Perspective. In the row that displays information about the specific Red Hat CodeReady Workspaces Operator, uninstall the CodeReady Workspaces Operator using the drop-down menu illustrated as three horizontal dots situated on the right side of the screen. Accept the selected option, Also completely remove the Operator from the selected namespace . Alternatively, uninstall the Red Hat CodeReady Workspaces Operator by clicking the displayed Red Hat CodeReady Workspaces Operator, Red Hat CodeReady Workspaces , followed by selecting the Uninstall Operator option in the Actions drop-down menu on the top right. 7.1.2. Uninstalling CodeReady Workspaces using oc commands This section provides instructions on how to uninstall a CodeReady Workspaces instance using oc commands. Prerequisites CodeReady Workspaces was installed on an OpenShift cluster using OperatorHub. OpenShift command-line tools ( oc ) are installed on the local workstation. Procedure The following procedure provides command-line outputs as examples. Note that output in the user terminal may differ. To uninstall a CodeReady Workspaces instance from a cluster: Sign in to the cluster: Switch to the project where the CodeReady Workspaces instance is deployed: Obtain the CodeReady Workspaces cluster name. The following shows a cluster named red-hat-codeready-workspaces : Delete the CodeReady Workspaces cluster: Obtain the name of the CodeReady Workspaces cluster service version (CSV) module. The following detects a CSV module named red-hat-codeready-workspaces.v2.1 : Delete the CodeReady Workspaces CSV: 7.2. Uninstalling CodeReady Workspaces after crwctl installation This section describes how to uninstall an instance of Red Hat CodeReady Workspaces that was installed using the crwctl tool. Important For CodeReady Workspaces installed using the crwctl server:start command and the -n argument (custom namespace specified), use the -n argument also to uninstall the CodeReady Workspaces instance. For installations that did not use the -n argument, the created namespace is named workspaces by default. Prerequisites CodeReady Workspaces was installed on an OpenShift cluster using crwctl . OpenShift command-line tools ( oc ) and crwctl are installed on the local workstation. The user is logged in a CodeReady Workspaces cluster using oc . Procedure Stop the Red Hat CodeReady Workspaces Server: Obtain the name of the CodeReady Workspaces namespace: Remove CodeReady Workspaces from the cluster: This removes all CodeReady Workspaces installations from the cluster.

Commands:
oc login -u <username> -p <password> <cluster_URL>
oc project <codeready-workspaces_project>
oc get checluster NAME AGE red-hat-codeready-workspaces 27m
oc delete checluster red-hat-codeready-workspaces checluster.org.eclipse.che "red-hat-codeready-workspaces" deleted
oc get csv NAME DISPLAY VERSION REPLACES PHASE red-hat-codeready-workspaces.v2.1 Red Hat CodeReady Workspaces 2.1 red-hat-codeready-workspaces.v2.0 Succeeded
oc delete csv red-hat-codeready-workspaces.v2.1 clusterserviceversion.operators.coreos.com "red-hat-codeready-workspaces.v2.1" deleted
crwctl server:stop
oc get checluster --all-namespaces -o=jsonpath="{.items[*].metadata.namespace}"
crwctl server:delete -n <namespace>