# Updating documents - immutability

**URL:** <https://discuss.elastic.co/t/updating-documents-immutability/266041>\
**Category:** Elasticsearch\
**Created:** [March 3, 2021, 2:16am UTC](https://discuss.elastic.co/t/updating-documents-immutability/266041 "2021-03-03T02:16:42Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![abhishekc92](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@abhishekc92](https://discuss.elastic.co/u/abhishekc92)\
**Post date:** [March 3, 2021, 2:30am UTC](https://discuss.elastic.co/t/updating-documents-immutability/266041/3 "2021-03-03T02:30:09Z")

</div>

Well I'm fairly new to elastic, and am doing some capacity planning/sizing. My question is along the lines of [https://discuss.elastic.co/t/deleting-old-versions/4689](https://discuss.elastic.co/t/deleting-old-versions/4689). One of the answers there said

> These 'deleted' docs will be automatically removed at some point in the  
> future when the "segments" in your index are merged. This happens in  
> the background, but can be manually triggered using the optimize API.

This is probably what I'm asking about. Say I update document 1. There is an older version now lingering in storage(soft deleted). When is this older version deleted and when is that space available to me again?

---

_[View the full topic](https://discuss.elastic.co/t/updating-documents-immutability/266041)._
