// Module included in the following assemblies:
//
// * /serverless/eventing/brokers/serverless-using-brokers.adoc

:_mod-docs-content-type: PROCEDURE
[id="serverless-deleting-broker-injection_{context}"]
= Deleting a broker that was created by injection

If you create a broker by injection and later want to delete it, you must delete it manually. Brokers created by using a namespace label or trigger annotation are not deleted permanently if you remove the label or annotation.

.Prerequisites

* Install the OpenShift CLI (`oc`).

.Procedure

. Remove the `eventing.knative.dev/injection=enabled` label from the namespace:
+
[source,terminal]
----
$ oc label namespace <namespace> eventing.knative.dev/injection-
----
+
Removing the annotation prevents Knative from recreating the broker after you delete it.

. Delete the broker from the selected namespace:
+
[source,terminal]
----
$ oc -n <namespace> delete broker <broker_name>
----

.Verification

* Use the `oc` command to get the broker:
+
[source,terminal]
----
$ oc -n <namespace> get broker <broker_name>
----
+
.Example command
[source,terminal]
----
$ oc -n default get broker default
----
+
.Example output
[source,terminal]
----
No resources found.
Error from server (NotFound): brokers.eventing.knative.dev "default" not found
----
