# Question about "Drop All"

**URL:** <https://discuss.dgraph.io/t/question-about-drop-all/2522>\
**Category:** Users\
**Created:** [April 28, 2018, 11:34am UTC](https://discuss.dgraph.io/t/question-about-drop-all/2522 "2018-04-28T11:34:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jair](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jair](https://discuss.dgraph.io/u/Jair)\
**Post date:** [April 28, 2018, 11:34am UTC](https://discuss.dgraph.io/t/question-about-drop-all/2522/1 "2018-04-28T11:34:07Z")

</div>

I don’t understand how this command work.  
After executed below command, I insert same schema and a new node with same properties as before.

> To drop all data and schema:  
> `curl -X POST localhost:8080/alter -d '{"drop_all": true}'`

This won’t reset uid to 0x0, right?  
If I use `func: eq` , it only get the new node.  
But If I use `uid` with old node uid. I can also get old data. So, the data drop strategy here is not really drop for efficiency? Will it do really drop automatically in future if storage free space is not enough? Or should I have to stop dgraph and delete p&w directory manually?

---

<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:** [April 29, 2018, 11:51pm UTC](https://discuss.dgraph.io/t/question-about-drop-all/2522/2 "2018-04-29T23:51:32Z")

</div>

> [@Jair](#):
>
> This won’t reset uid to 0x0, right?

Yeah, this doesn’t reset the `uid`, the `uid` would continue from the last allocated uid. Though drop all should drop all the data.

> [@Jair](#):
>
> But If I use uid with old node uid. I can also get old data.

Can you give an example? I suppose you are just trying to query using the uid, something like

```auto
{
  me(func: uid(0x01)) {
    uid
  }
}

```

In this case, Dgraph would always return the uid back irrespective of its value and this is not a good way to check if the node exists. See [func: uid() always returns data, even if node does not exist · Issue #2086 · dgraph-io/dgraph · GitHub](https://github.com/dgraph-io/dgraph/issues/2086). You should not get back any other predicate after doing a drop all though.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex007/uploads/dgraph/original/2X/2/2b38fdece2abe5814f2e51bee69d1e67fc304b0a.png) [@system](https://discuss.dgraph.io/u/system)\
**Post date:** [May 29, 2018, 11:51pm UTC](https://discuss.dgraph.io/t/question-about-drop-all/2522/3 "2018-05-29T23:51:38Z")

</div>

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