# Cleanup Agents PMM

**URL:** <https://forums.percona.com/t/cleanup-agents-pmm/8343>\
**Category:** PMM 2.x\
**Tags:** pmm\
**Created:** [December 4, 2020, 5:00am UTC](https://forums.percona.com/t/cleanup-agents-pmm/8343 "2020-12-04T05:00:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrewkew](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/andrewkew/32/1475_2.png) [@andrewkew](https://forums.percona.com/u/andrewkew)\
**Post date:** [December 4, 2020, 5:00am UTC](https://forums.percona.com/t/cleanup-agents-pmm/8343/1 "2020-12-04T05:00:59Z")

</div>

Hi

I am using an external service because I have added an additional prometheus exporter to my PMM client

While I have been testing it and getting it to work I have been adding external services and remove them too

```auto
pmm-admin add external ...
pmm-admin remove external ...

```

But what this has done is it creates agents that dont seem to disappear so now my agent list looks as follows

```auto
Agent type Status Agent ID Service ID
pmm_agent Connected /agent_id/b0e6c6de-2fc1-4b6a-a29d-b1074fa321f6
node_exporter Running /agent_id/0ac02c1d-bbb5-4e4b-8a90-98e2cd485d65
mysqld_exporter Running /agent_id/209588aa-ca84-4274-b3d3-dde6554069b8 /service_id/7a9b07cc-38b5-48d1-b9e5-78d393c7f132
mysql_perfschema_agent Running /agent_id/eb97ff81-d819-4d74-874a-47866ffcb112 /service_id/7a9b07cc-38b5-48d1-b9e5-78d393c7f132
external-exporter Unknown /agent_id/0d753018-da80-4f93-8e7d-80df597728fb /service_id/446ad14d-8345-4b66-8de9-61f2555424eb
external-exporter Unknown /agent_id/162da5f6-112e-475d-b467-1b0c339acb63 /service_id/7662b202-2331-4971-bba2-9758da53be3b
external-exporter Unknown /agent_id/3dd6f0d7-6c50-4f7c-b431-5e8fc768364c /service_id/bd278d00-345a-450b-8d6c-3b3248baa1b5
external-exporter Unknown /agent_id/e81c547f-1894-41d5-9a99-51407c513009 /service_id/a3f49eb1-d455-47d4-8780-2d3f9034cdf1

```

Any ideas on how I clean up those external export agents that dont link to services that exist anymore on the client?

---

<div class="post-metadata">

**Author:** ![Vadim\_Yalovets](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vadim_yalovets/32/43_2.png) [@Vadim\_Yalovets](https://forums.percona.com/u/Vadim_Yalovets)\
**Post date:** [December 4, 2020, 5:54am UTC](https://forums.percona.com/t/cleanup-agents-pmm/8343/2 "2020-12-04T05:54:24Z")

</div>

You may delete any instance on “PMM Inventory” page

![Screenshot_20201204_132316.png](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/1X/d680fe79d91c9299887e41fda7abaea6cfeba359.png)

---

<div class="post-metadata">

**Author:** ![andrewkew](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/andrewkew/32/1475_2.png) [@andrewkew](https://forums.percona.com/u/andrewkew)\
**Post date:** [December 4, 2020, 6:29am UTC](https://forums.percona.com/t/cleanup-agents-pmm/8343/3 "2020-12-04T06:29:33Z")

</div>

Hi @adivinho

Ah perfect this is exactly what i was looking for, didnt even realize those menu options were there

Thanks so much for your help
