# Best way to purge saved objects not being used by dashboards?

**URL:** <https://discuss.elastic.co/t/best-way-to-purge-saved-objects-not-being-used-by-dashboards/157427>\
**Category:** Kibana\
**Created:** [November 19, 2018, 7:19pm UTC](https://discuss.elastic.co/t/best-way-to-purge-saved-objects-not-being-used-by-dashboards/157427 "2018-11-19T19:19:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Vasquez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matt_vasquez/32/22088_2.png) [@Matt\_Vasquez](https://discuss.elastic.co/u/Matt_Vasquez)\
**Post date:** [November 19, 2018, 7:19pm UTC](https://discuss.elastic.co/t/best-way-to-purge-saved-objects-not-being-used-by-dashboards/157427/1 "2018-11-19T19:19:35Z")

</div>

Whats the best way to purge saved objects such as saved searches and visualizations that are not being used by a dashboard?

I have a bunch of beats dashboards and I am not currently utilizing all of them..

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [November 19, 2018, 8:22pm UTC](https://discuss.elastic.co/t/best-way-to-purge-saved-objects-not-being-used-by-dashboards/157427/2 "2018-11-19T20:22:00Z")

</div>

@Matt_Vasquez there's no automated way or built-in way to do this.

if you feel adventurous, you could write a script that queries the objects in the internal `.kibana` index.

`http://localhost:9200/.kibana/_search`

for all the ones where `type: visualization` and `type: dashboard`. Remove from that .kibana-index all the visualizations, that are not present in the `panelJson` of the dashboard object.

YMMV 😉

---

<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:** [December 17, 2018, 8:22pm UTC](https://discuss.elastic.co/t/best-way-to-purge-saved-objects-not-being-used-by-dashboards/157427/3 "2018-12-17T20:22:01Z")

</div>

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