# Vaccum Deleted Documents

**URL:** <https://discuss.elastic.co/t/vaccum-deleted-documents/339974>\
**Category:** Elasticsearch\
**Created:** [August 2, 2023, 8:47pm UTC](https://discuss.elastic.co/t/vaccum-deleted-documents/339974 "2023-08-02T20:47:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TomTom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tomtom/32/3676_2.png) [@TomTom](https://discuss.elastic.co/u/TomTom)\
**Post date:** [August 2, 2023, 8:47pm UTC](https://discuss.elastic.co/t/vaccum-deleted-documents/339974/1 "2023-08-02T20:47:03Z")

</div>

I learned that Elasticsearch does not update a document, but instead, deletes the current document and creates a new one with the updates.

It happens that I have several documents that are updated several times during the day, and because of that it ends up generating several deleted documents.

Is it possible to delete these deleted documents and gain disk space?

My Elasticsearch version is 8.8

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 2, 2023, 9:13pm UTC](https://discuss.elastic.co/t/vaccum-deleted-documents/339974/2 "2023-08-02T21:13:53Z")

</div>

It's done automatically when merge is happening.  
If you really need to do it manually, you can call the force merge API.

---

<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 30, 2023, 9:14pm UTC](https://discuss.elastic.co/t/vaccum-deleted-documents/339974/3 "2023-08-30T21:14:22Z")

</div>

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