// Module included in the following assemblies:
// * hosted-control-planes/hcp-prepare/hcp-enable-disable.adoc

:_mod-docs-content-type: PROCEDURE
[id="hcp-uninstall-operator_{context}"]
= Uninstalling the HyperShift Operator

[role="_abstract"]
Before you can disable the {hcp} feature, you need to uninstall the HyperShift Operator and disable the `hypershift-addon` from the `local-cluster`.

.Procedure

. Run the following command to ensure that there is no hosted cluster running:
+
[source,terminal]
----
$ oc get hostedcluster -A
----
+
[IMPORTANT]
====
If a hosted cluster is running, the HyperShift Operator does not uninstall, even if the `hypershift-addon` is disabled.
====

. Disable the `hypershift-addon` by running the following command:
+
[source,terminal]
----
$ oc patch mce multiclusterengine --type=merge -p \
  '{"spec":{"overrides":{"components":[{"name":"hypershift-local-hosting","enabled": false}]}}}'
----
+
The default `MultiClusterEngine` resource instance name is `multiclusterengine`, but you can get the `MultiClusterEngine` name from your cluster by running the following command: `$ oc get mce`.
+
[NOTE]
====
You can also disable the `hypershift-addon` for the `local-cluster` from the {mce-short} console after disabling the `hypershift-addon`.
====