# Is it possible to remove Inactive Agents from Fleet?

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-remove-inactive-agents-from-fleet/334043>\
**Category:** Elastic Agent\
**Tags:** fleet\
**Created:** [May 22, 2023, 5:59pm UTC](https://discuss.elastic.co/t/is-it-possible-to-remove-inactive-agents-from-fleet/334043 "2023-05-22T17:59:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kreed](https://avatars.discourse-cdn.com/v4/letter/k/5f8ce5/32.png) [@kreed](https://discuss.elastic.co/u/kreed)\
**Post date:** [May 22, 2023, 5:59pm UTC](https://discuss.elastic.co/t/is-it-possible-to-remove-inactive-agents-from-fleet/334043/1 "2023-05-22T17:59:40Z")

</div>

After uninstalling an Agent, as expected the agent shows a status of Offline in Fleet. Then once the agent is unenrolled, it goes to a status of Inactive. A [previous question](https://discuss.elastic.co/t/is-it-possible-to-reconnect-to-an-agent-after-uninstalling-the-elastic-agent-service/328273) I had asked on this forum was if it is possible to reconnect to an Agent that was previously uninstalled. It was deemed not possible. So now I am wondering if it is possible to remove Inactive (Unenrolled) agents from Fleet.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/6/d657fd7e26c4f5d875b3647eff9d8635663293d4.png)

---

<div class="post-metadata">

**Author:** ![Cristina\_Amico](https://avatars.discourse-cdn.com/v4/letter/c/9fc29f/32.png) [@Cristina\_Amico](https://discuss.elastic.co/u/Cristina_Amico)\
**Post date:** [May 25, 2023, 2:17pm UTC](https://discuss.elastic.co/t/is-it-possible-to-remove-inactive-agents-from-fleet/334043/2 "2023-05-25T14:17:36Z")

</div>

Hi @kreed,

Yes it is possible, you can follow the steps in this guide:

> **[Unenroll Elastic Agents | Fleet and Elastic Agent Guide \[8.6\] | Elastic](https://www.elastic.co/guide/en/fleet/8.6/unenroll-elastic-agent.html)**

To remove them completely, you should select the "force unenroll" checkbox that will displayed in the prompt.

Thanks,  
Cristina

---

<div class="post-metadata">

**Author:** ![kreed](https://avatars.discourse-cdn.com/v4/letter/k/5f8ce5/32.png) [@kreed](https://discuss.elastic.co/u/kreed)\
**Post date:** [May 25, 2023, 2:26pm UTC](https://discuss.elastic.co/t/is-it-possible-to-remove-inactive-agents-from-fleet/334043/3 "2023-05-25T14:26:01Z")

</div>

Hello @Cristina_Amico

All of the agents in the image above have either been unenrolled or forced unenrolled. In the image below you will see I do not have that option available for selection on these agents.

Unenrolling/Force Unenrolling does not seem to remove the agents from this list. It just sets their status to Inactive.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/1/91fdd8904c048e38eeb4d681b23c6228aa22042c.png)  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/d/9d2cced44542d62d40fb19d303b4f5e71fb63b6a.png)

---

<div class="post-metadata">

**Author:** ![Cristina\_Amico](https://avatars.discourse-cdn.com/v4/letter/c/9fc29f/32.png) [@Cristina\_Amico](https://discuss.elastic.co/u/Cristina_Amico)\
**Post date:** [May 25, 2023, 2:54pm UTC](https://discuss.elastic.co/t/is-it-possible-to-remove-inactive-agents-from-fleet/334043/4 "2023-05-25T14:54:34Z")

</div>

Sorry, I misread your original question. You're right, once the agents get unenrolled they become inactive and are stored as such, but there is no actual way to delete them completely.

For now the only workaround is to filter them out from the agents table by deselecting "inactive" and "unenrolled" status in the table filters.

Hope this helps.

Thanks,  
Cristina

---

<div class="post-metadata">

**Author:** ![kreed](https://avatars.discourse-cdn.com/v4/letter/k/5f8ce5/32.png) [@kreed](https://discuss.elastic.co/u/kreed)\
**Post date:** [May 26, 2023, 1:32pm UTC](https://discuss.elastic.co/t/is-it-possible-to-remove-inactive-agents-from-fleet/334043/5 "2023-05-26T13:32:29Z")

</div>

Thanks for the insight @Cristina_Amico

The link you provided gives me a 404 error. Is it only able to be accessed internally?

---

<div class="post-metadata">

**Author:** ![Cristina\_Amico](https://avatars.discourse-cdn.com/v4/letter/c/9fc29f/32.png) [@Cristina\_Amico](https://discuss.elastic.co/u/Cristina_Amico)\
**Post date:** [May 26, 2023, 3:51pm UTC](https://discuss.elastic.co/t/is-it-possible-to-remove-inactive-agents-from-fleet/334043/6 "2023-05-26T15:51:34Z")

</div>

Yes you're right, I thought it was tracked in our open issues. It is just an internal ticket for implementing removal of inactive agents.

Thanks,  
Cristina

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 23, 2023, 3:52pm UTC](https://discuss.elastic.co/t/is-it-possible-to-remove-inactive-agents-from-fleet/334043/7 "2023-06-23T15:52:24Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
