# Disk usage problem after delete mutation

**URL:** <https://discuss.dgraph.io/t/disk-usage-problem-after-delete-mutation/19275>\
**Category:** Dgraph\
**Created:** [April 10, 2024, 6:22am UTC](https://discuss.dgraph.io/t/disk-usage-problem-after-delete-mutation/19275 "2024-04-10T06:22:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lyiang](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/lyiang/32/11577_2.png) [@Lyiang](https://discuss.dgraph.io/u/Lyiang)\
**Post date:** [April 10, 2024, 6:22am UTC](https://discuss.dgraph.io/t/disk-usage-problem-after-delete-mutation/19275/1 "2024-04-10T06:22:06Z")

</div>

My usage scenario is to store a large amount of data every day, and then find some of the data, about 99%, and execute delete

but after executing the deletion mutation, the disk usage is still increasing.

So what should I do so that the data that needs to be deleted is actually deleted from the disk?

---

<div class="post-metadata">

**Author:** ![vnium](https://avatars.discourse-cdn.com/v4/letter/v/e56c9b/32.png) [@vnium](https://discuss.dgraph.io/u/vnium)\
**Post date:** [April 10, 2024, 11:51am UTC](https://discuss.dgraph.io/t/disk-usage-problem-after-delete-mutation/19275/2 "2024-04-10T11:51:38Z")

</div>

Deletion of data happens during the compaction of LSM tree levels. If you are not writing enough data to trigger a level compaction, the data won’t be deleted on disk. Check out these links for further information:

- [Understanding Garbage Collection - #2 by jkuki](https://discuss.hypermode.com/t/understanding-garbage-collection/15686/2)
- [What triggers compactions of LSM trees in badgerDB?](https://discuss.hypermode.com/t/what-triggers-compactions-of-lsm-trees-in-badgerdb/12751)
