# Dgraph automatically generates dgraph\_index, will the data be stored here?

**URL:** <https://discuss.dgraph.io/t/dgraph-automatically-generates-dgraph-index-will-the-data-be-stored-here/9732>\
**Category:** Dgraph\
**Tags:** kind:question\
**Created:** [August 28, 2020, 12:32pm UTC](https://discuss.dgraph.io/t/dgraph-automatically-generates-dgraph-index-will-the-data-be-stored-here/9732 "2020-08-28T12:32:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tss](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/tss/32/4409_2.png) [@tss](https://discuss.dgraph.io/u/tss)\
**Post date:** [August 28, 2020, 12:32pm UTC](https://discuss.dgraph.io/t/dgraph-automatically-generates-dgraph-index-will-the-data-be-stored-here/9732/1 "2020-08-28T12:32:17Z")

</div>

I found that the dgraph\_index file gradually became larger and filled up the disk. My alpha configuration：  
`--postings /export/dgraphdata/p200 --wal /export/dgraphdata/w200 >alpha200out.file 2>&1 &`

 ![image](https://canada1.discourse-cdn.com/flex007/uploads/dgraph/original/2X/7/7f38f0582ec010e889fa693b4a0bffdffba998b0.png)

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [August 28, 2020, 4:21pm UTC](https://discuss.dgraph.io/t/dgraph-automatically-generates-dgraph-index-will-the-data-be-stored-here/9732/2 "2020-08-28T16:21:08Z")

</div>

Hi tss,

I never heard about a folder or file called dgraph\_index. All indexing, data, caches and so on, are stored in Badger format (.sst, .vlog) in the same root path they have started.

This for sure is your root path that you have started Dgraph. And it will increases and decrease of size once Dgraph runs GC and some other tasks.

---

<div class="post-metadata">

**Author:** ![tss](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/tss/32/4409_2.png) [@tss](https://discuss.dgraph.io/u/tss)\
**Post date:** [August 29, 2020, 9:23am UTC](https://discuss.dgraph.io/t/dgraph-automatically-generates-dgraph-index-will-the-data-be-stored-here/9732/3 "2020-08-29T09:23:24Z")

</div>

Can i delete the folder?I found that there are also vlog and sst files in the file  
 ![image](https://canada1.discourse-cdn.com/flex007/uploads/dgraph/original/2X/7/78340638be6a6d6ee0bb1988e62156985108475a.png)

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [August 29, 2020, 12:02pm UTC](https://discuss.dgraph.io/t/dgraph-automatically-generates-dgraph-index-will-the-data-be-stored-here/9732/4 "2020-08-29T12:02:38Z")

</div>

If you wanna cleanup the whole thing, yes. You can delete everything. But export your data first to a safe place.

---

<div class="post-metadata">

**Author:** ![pawan](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/pawan/32/1946_2.png) [@pawan](https://discuss.dgraph.io/u/pawan)\
**Post date:** [August 29, 2020, 1:43pm UTC](https://discuss.dgraph.io/t/dgraph-automatically-generates-dgraph-index-will-the-data-be-stored-here/9732/5 "2020-08-29T13:43:09Z")

</div>

> [@tss](#):
>
> I found that the dgraph\_index file gradually became larger and filled up the disk.

From [dgraph/posting/index.go at master · dgraph-io/dgraph · GitHub](https://github.com/dgraph-io/dgraph/blob/master/posting/index.go#L603), I can see that this directory is a temporary directory that is used when a `predicate` is being reindexed. It should be automatically cleaned up after the reindexing process is done for a predicate. Seems like it wasn’t removed for you automatically for some reason.

If you don’t have any ongoing reindexing, you can delete the folder safely.

---

<div class="post-metadata">

**Author:** ![tss](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/tss/32/4409_2.png) [@tss](https://discuss.dgraph.io/u/tss)\
**Post date:** [August 29, 2020, 2:34pm UTC](https://discuss.dgraph.io/t/dgraph-automatically-generates-dgraph-index-will-the-data-be-stored-here/9732/6 "2020-08-29T14:34:40Z")

</div>

Thank you for your reply, I have re-imported the data
