# Service Name is still showing after deletion in APM

**URL:** <https://discuss.elastic.co/t/service-name-is-still-showing-after-deletion-in-apm/238994>\
**Category:** APM\
**Tags:** java, ui\
**Created:** [June 28, 2020, 9:49am UTC](https://discuss.elastic.co/t/service-name-is-still-showing-after-deletion-in-apm/238994 "2020-06-28T09:49:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pankaj\_Navneet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pankaj_navneet/32/42419_2.png) [@Pankaj\_Navneet](https://discuss.elastic.co/u/Pankaj_Navneet)\
**Post date:** [June 28, 2020, 9:49am UTC](https://discuss.elastic.co/t/service-name-is-still-showing-after-deletion-in-apm/238994/1 "2020-06-28T09:49:05Z")

</div>

Hi team,

I have deleted a service name in APM using below query from console, but still after few minutes the service name again pop-ups in APM section. I even tried to delete all the apm indexes from Management section, (also restarted apm-server), but still after few minutes service name pop-ups there in APM section.

```
POST apm-7.7.0-*/_delete_by_query
{
  "query": {
     "term": {
       "service.name": "my-App"
     }
  }
}

```

I have attached the apm-agent using `apm-agent-attach-1.16.0-standalone.jar` and currently it is not attached to my java application.

Can you please advise how to fix this issue permanently. I have tried everything but nothing worked.

Below are the details of my setup.

**Kibana version** : 7.7.0

**Elasticsearch version** : 7.7.0

**APM Server version** : 7.7.0

**APM Agent language and version** : Java and apm-agent-attach-1.16.0-standalone.jar

**Browser version** : Chrome Version 83.0.4103.61

**Original install method (e.g. download page, yum, deb, from source, etc.) and version** : Yum

**Fresh install or upgraded from other version?** : Upgraded from 7.3.2

**Is there anything special in your setup?** No Load balancer used for APM server

Br  
Pankaj N

---

<div class="post-metadata">

**Author:** ![sqren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sqren/32/26110_2.png) [@sqren](https://discuss.elastic.co/u/sqren)\
**Post date:** [June 29, 2020, 7:51am UTC](https://discuss.elastic.co/t/service-name-is-still-showing-after-deletion-in-apm/238994/2 "2020-06-29T07:51:50Z")

</div>

Hi there,

> [@Pankaj\_Navneet](#):
>
> but still after few minutes the service name again pop-ups in APM sectio

If I'm understanding this correctly, after you run `_delete_by_query` the service disappears but then it shows up again after a couple of minutes?  
If this is the case it sounds very much like the service is still running and sending data. Can you double-check whether this is the case?

Another reason might be that you have apm data from other versions than 7.7. You can delete across all versions with `POST apm-*-*/_delete_by_query`

Let me know how it goes.

---

<div class="post-metadata">

**Author:** ![Pankaj\_Navneet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pankaj_navneet/32/42419_2.png) [@Pankaj\_Navneet](https://discuss.elastic.co/u/Pankaj_Navneet)\
**Post date:** [June 29, 2020, 8:04am UTC](https://discuss.elastic.co/t/service-name-is-still-showing-after-deletion-in-apm/238994/3 "2020-06-29T08:04:32Z")

</div>

Hi @sqren

Thanks for your reply.

Yes your understanding is correct, service disappears after running the query but re-appears after few minutes.

I have used the `apm-agent-attach-1.16.0-standalone.jar` method for the apm-agent with my application and i have removed it by giving a stop/start to my application. So, there is no chance apm-agent will automatically get attached to the application, as i was attaching the apm-agent imanually only. Also, i have verified it, as no data is getting showed up in the APM section. Only the service name re-appears.

I am also confirming that there is no apm data from other versions than 7.7

Br  
Pankaj N

---

<div class="post-metadata">

**Author:** ![felixbarny](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felixbarny/32/27341_2.png) [@felixbarny](https://discuss.elastic.co/u/felixbarny)\
**Post date:** [June 29, 2020, 9:04am UTC](https://discuss.elastic.co/t/service-name-is-still-showing-after-deletion-in-apm/238994/4 "2020-06-29T09:04:25Z")

</div>

Normally, the service name can only be shown if there's data for that service. Could you search for documents of that service in the discover tab? Maybe there's another instance of that service running somewhere that reports metrics in the background. In that case, you wouldn't see transactions in the UI as there are only metrics. Maybe you accidentally attached the agent to multiple services. Looking at the metadata of the metric events, you should be able to identify the process that's still sending metrics.

---

<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:** [July 20, 2020, 5:18am UTC](https://discuss.elastic.co/t/service-name-is-still-showing-after-deletion-in-apm/238994/5 "2020-07-20T05:18:31Z")

</div>

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