//Module included in the following assemblies:
//
// * observability/otel/otel-removing.adoc

:_mod-docs-content-type: PROCEDURE
[id="removing-otel-instance-cli_{context}"]
= Removing an OpenTelemetry Collector instance by using the CLI

You can remove an OpenTelemetry Collector instance on the command line.

.Prerequisites

* An active {oc-first} session by a cluster administrator with the `cluster-admin` role.
+
[TIP]
====
* Ensure that your {oc-first} version is up to date and matches your {product-title} version.

* Run `oc login`:
+
[source,terminal]
----
$ oc login --username=<your_username>
----
====

.Procedure

. Get the name of the OpenTelemetry Collector instance by running the following command:
+
[source,terminal]
----
$ oc get deployments -n <project_of_opentelemetry_instance>
----

. Remove the OpenTelemetry Collector instance by running the following command:
+
[source,terminal]
----
$ oc delete opentelemetrycollectors <opentelemetry_instance_name> -n <project_of_opentelemetry_instance>
----

. Optional: Remove the {OTELOperator}.

.Verification

* To verify successful removal of the OpenTelemetry Collector instance, run `oc get deployments` again:
+
[source,terminal]
----
$ oc get deployments -n <project_of_opentelemetry_instance>
----
