Uninstalling Che after OperatorHub installation using OpenShift CLI

This section provides instructions on how to uninstall a Che instance using oc commands.

Prerequisites
  • Che was installed on an OpenShift cluster using OperatorHub.

  • The oc tool is available.

Procedure

The following procedure provides command-line outputs as examples. Note that output in the user terminal may differ.

To uninstall a Che instance from a cluster:

  1. Sign in to the cluster:

    $ oc login -u <username> -p <password> <cluster_URL>
  2. Switch to the project where the Che instance is deployed:

    $ oc project <che_project>
  3. Obtain the Che cluster name. The following shows a cluster named eclipse-che:

    $ oc get checluster
    NAME          AGE
    eclipse-che   27m
  4. Delete the Che cluster:

    $ oc delete checluster eclipse-che
    checluster.org.eclipse.che "eclipse-che" deleted
  5. Obtain the name of the Che cluster service version (CSV) module. The following detects a CSV module named eclipse-che.v7.18:

    $ oc get csv
    NAME                 DISPLAY       VERSION   REPLACES             PHASE
    eclipse-che.v7.18   Eclipse Che   7.18     eclipse-che.v7.16   Succeeded
  6. Delete the Che CSV:

    $ oc delete csv eclipse-che.v7.18
    clusterserviceversion.operators.coreos.com "eclipse-che.v7.18" deleted