# How to delete amp service?

**URL:** <https://discuss.elastic.co/t/how-to-delete-amp-service/301908>\
**Category:** APM\
**Tags:** java\
**Created:** [April 8, 2022, 1:25am UTC](https://discuss.elastic.co/t/how-to-delete-amp-service/301908 "2022-04-08T01:25:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![xcyk1226](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xcyk1226/32/103815_2.png) [@xcyk1226](https://discuss.elastic.co/u/xcyk1226)\
**Post date:** [April 8, 2022, 1:25am UTC](https://discuss.elastic.co/t/how-to-delete-amp-service/301908/1 "2022-04-08T01:25:37Z")

</div>

![image](https://us1.discourse-cdn.com/elastic/original/3X/a/4/a414371cb70dbb1eca77885b60864eb091a77c9b.png)  
I want to delete some service ,but I can't find delete button,how can i delete those service?can you help me?

---

<div class="post-metadata">

**Author:** ![gil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gil/32/41911_2.png) [@gil](https://discuss.elastic.co/u/gil)\
**Post date:** [April 8, 2022, 2:34am UTC](https://discuss.elastic.co/t/how-to-delete-amp-service/301908/2 "2022-04-08T02:34:12Z")

</div>

Welcome to the community @xcyk1226!

The easiest way is to wait until the service stops reporting in on its own. If you'd really like to delete a service you'll need to remove the documents associated with it, similar to how you'd rename a service following [Update existing data | APM Server Reference [7.15] | Elastic](https://www.elastic.co/guide/en/apm/server/current/update-existing-data.html). To delete, change `_update_by_query` to `_delete_by_query` and remove the script, like:

```auto
POST /apm-*/_delete_by_query
{
  "query": {
    "term": {
      "service.name": {
        "value": "old-service-name"
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![xcyk1226](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xcyk1226/32/103815_2.png) [@xcyk1226](https://discuss.elastic.co/u/xcyk1226)\
**Post date:** [April 8, 2022, 5:13am UTC](https://discuss.elastic.co/t/how-to-delete-amp-service/301908/3 "2022-04-08T05:13:45Z")

</div>

my kibana version is 7.17.1, I execute the cmd , but apm service page also exists service

---

<div class="post-metadata">

**Author:** ![xcyk1226](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xcyk1226/32/103815_2.png) [@xcyk1226](https://discuss.elastic.co/u/xcyk1226)\
**Post date:** [April 8, 2022, 8:54am UTC](https://discuss.elastic.co/t/how-to-delete-amp-service/301908/4 "2022-04-08T08:54:58Z")

</div>

I try long time,execute next cmd can solve

```auto
POST .*apm*/_delete_by_query
{
  "query": {
    "term": {
      "service.name": {
        "value": "web-test"
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![gil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gil/32/41911_2.png) [@gil](https://discuss.elastic.co/u/gil)\
**Post date:** [April 8, 2022, 1:26pm UTC](https://discuss.elastic.co/t/how-to-delete-amp-service/301908/5 "2022-04-08T13:26:44Z")

</div>

I'm not sure I fully understand, are you saying you needed to execute the delete by query on `.*apm*` to resolve the issue? That would make sense if you are utilizing data streams (eg if using the APM Integration) - nice work! We will get this into the docs.

---

<div class="post-metadata">

**Author:** ![xcyk1226](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xcyk1226/32/103815_2.png) [@xcyk1226](https://discuss.elastic.co/u/xcyk1226)\
**Post date:** [April 11, 2022, 1:31am UTC](https://discuss.elastic.co/t/how-to-delete-amp-service/301908/6 "2022-04-11T01:31:39Z")

</div>

yes !

---

<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:** [May 1, 2022, 9:32pm UTC](https://discuss.elastic.co/t/how-to-delete-amp-service/301908/7 "2022-05-01T21:32:09Z")

</div>

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