- Elastic Docs/
- Reference/
- Ingestion tools/
- Fleet and Elastic Agent/
- Manage Elastic Agents in Fleet/
- Elastic Agents
Unenroll Elastic Agents
You can unenroll Elastic Agents to invalidate the API key used to connect to Elasticsearch.
In Fleet, selectAgents.
To unenroll a single agent, chooseUnenroll agent from theActions menu next to the agent you want to unenroll.
To unenroll multiple agents, bulk select the agents and clickUnenroll agents.
Unable to select multiple agents? Confirm that your subscription level supportsselective agent unenrollment in Fleet. For more information, refer toElastic subscriptions.
Unenrolled agents will continue to run, but will not be able to send data. They will show this error instead:invalid api key to authenticate with fleet.
If unenrollment hangs, selectForce unenroll to invalidate all API keys related to the agent and change the status toinactive so that the agent no longer appears in Fleet.
Enrollment handling for Elastic Agent in a containerized environment has some special nuances.For details refer toEnrollment handing for containerized agents.