<a id="usm-remove-agent"></a>

# Remove the USM Agent

Removing the USM Agent completely uninstalls it from your
Confluent Platform environment. This differs from
[deregistering a Kafka cluster](register/complete-registration.md#complete-registration), which
only removes cluster metadata from USM but leaves the agent
running.

## When to remove the agent

Consider removing the USM Agent in the following scenarios:

* You have deregistered all Kafka and Connect clusters that were registered through this agent.
* You are migrating to a different agent deployment or environment.
* You are decommissioning the environment entirely.

## Remove the agent using Confluent for Kubernetes

To remove the USM Agent from a Confluent for Kubernetes deployment, follow the instructions in the
[Delete Confluent Platform Deployment documentation](https://docs.confluent.io/operator/current/co-delete-deployment.html#delete-the-cp-components).

The Confluent for Kubernetes documentation includes steps for deleting Confluent Platform components, including the USM Agent.

## Remove the agent using Ansible Playbooks for Confluent Platform

To remove the USM Agent from an Ansible Playbooks for Confluent Platform deployment, see the
[Configure and Deploy Unified Stream Manager Using Ansible documentation](https://docs.confluent.io/ansible/current/ansible-usm.html)
for information about managing the USM Agent with Ansible Playbooks.

For general information about Ansible Playbooks for Confluent Platform, see the
[Ansible Playbooks overview](https://docs.confluent.io/ansible/current/overview.html).

## Related content

* [Unified Stream Manager in Confluent Cloud](overview.md#cloud-usm-overview)
* [Register Your Confluent Platform Cluster](register/overview.md#cloud-usm-register)
* [Deploy the USM Agent](register/deploy-agent.md#usm-agent)
* [Complete the Cluster Registration](register/complete-registration.md#complete-registration)
