# Elastic Cloud Trial Unable to remove greyed out Agent

**URL:** <https://discuss.elastic.co/t/elastic-cloud-trial-unable-to-remove-greyed-out-agent/279666>\
**Category:** Elastic Cloud Enterprise (ECE)\
**Created:** [July 26, 2021, 8:32pm UTC](https://discuss.elastic.co/t/elastic-cloud-trial-unable-to-remove-greyed-out-agent/279666 "2021-07-26T20:32:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![willemdh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/willemdh/32/16922_2.png) [@willemdh](https://discuss.elastic.co/u/willemdh)\
**Post date:** [July 26, 2021, 8:32pm UTC](https://discuss.elastic.co/t/elastic-cloud-trial-unable-to-remove-greyed-out-agent/279666/1 "2021-07-26T20:32:02Z")

</div>

Hello,

Playing around with Elastic Cloud trial and noticed I have an Agent in Fleet which I cannot remove:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/3/73eb6b0239821df0d17766d86dcc72093758916e.png)

The offline agent seems to remain unselectable and offline. How can I remove it?

Grtz

Willem

---

<div class="post-metadata">

**Author:** ![Alex\_Piggott](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_piggott/32/11053_2.png) [@Alex\_Piggott](https://discuss.elastic.co/u/Alex_Piggott)\
**Post date:** [July 30, 2021, 2:11pm UTC](https://discuss.elastic.co/t/elastic-cloud-trial-unable-to-remove-greyed-out-agent/279666/2 "2021-07-30T14:11:20Z")

</div>

it should disappear after a few hours, i think?

---

<div class="post-metadata">

**Author:** ![willemdh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/willemdh/32/16922_2.png) [@willemdh](https://discuss.elastic.co/u/willemdh)\
**Post date:** [July 31, 2021, 10:58am UTC](https://discuss.elastic.co/t/elastic-cloud-trial-unable-to-remove-greyed-out-agent/279666/3 "2021-07-31T10:58:58Z")

</div>

Nope, still there:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/1/51b4475a04c22da91c891f1a6310db3b55efb52e.png)

I think it's because I removed the apm node at a certain point, only to re-add it later, as I discovered it's also required for fleet?

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [August 3, 2021, 9:50am UTC](https://discuss.elastic.co/t/elastic-cloud-trial-unable-to-remove-greyed-out-agent/279666/4 "2021-08-03T09:50:41Z")

</div>

Under 7.13 unfortunately it can only be removed through an API call ( @nchaulet need your help on this one), in the upcoming 7.14 this agent with automatically disappear after a few minutes.

---

<div class="post-metadata">

**Author:** ![nchaulet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nchaulet/32/77896_2.png) [@nchaulet](https://discuss.elastic.co/u/nchaulet)\
**Post date:** [August 3, 2021, 7:04pm UTC](https://discuss.elastic.co/t/elastic-cloud-trial-unable-to-remove-greyed-out-agent/279666/5 "2021-08-03T19:04:13Z")

</div>

You could use the following call authenticated as a superuser to forceunenroll an agen.

```auto
curl 'https://{YOUR_KIBANA}/api/fleet/agents/{AGENT_ID}/unenroll' \
  -H 'kbn-xsrf: xx' \
  -H 'Content-type: application/json' \
  --data-raw '{"force":true,"revoke":true}' \
  --compressed

```

---

<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:** [August 17, 2021, 7:05pm UTC](https://discuss.elastic.co/t/elastic-cloud-trial-unable-to-remove-greyed-out-agent/279666/6 "2021-08-17T19:05:08Z")

</div>

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