# Delete record in aerospike

**URL:** <https://discuss.aerospike.com/t/delete-record-in-aerospike/1619>\
**Category:** Deletion\
**Tags:** deletion, durable-deletion\
**Created:** [August 12, 2015, 3:38pm UTC](https://discuss.aerospike.com/t/delete-record-in-aerospike/1619 "2015-08-12T15:38:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![max83](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@max83](https://discuss.aerospike.com/u/max83)\
**Post date:** [August 12, 2015, 3:38pm UTC](https://discuss.aerospike.com/t/delete-record-in-aerospike/1619/1 "2015-08-12T15:38:05Z")

</div>

I could not understand why when I delete record and then restart aerospike record come back (it is again in the “set”)? Is it normal? How I can delete it forever?

---

<div class="post-metadata">

**Author:** ![stiletto](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/stiletto/32/311_2.png) [@stiletto](https://discuss.aerospike.com/u/stiletto)\
**Post date:** [August 12, 2015, 4:29pm UTC](https://discuss.aerospike.com/t/delete-record-in-aerospike/1619/2 "2015-08-12T16:29:44Z")

</div>

You can’t, this is by design. It probably will be overwritten by another record, someday.

> [@How is data deleted?](https://discuss.aerospike.com/t/how-data-is-deleted/183):
>
> How is data deleted? Aerospike separates the data into two parts: index and value. The index is always stored in DRAM, the value can be stored in either SSD or DRAM (with or without disk for persistence). When a record is deleted, the reference to it is removed from the index. The actual data is not removed from the disk. Another process will find that the data on disk is not being used and reclaim the space. Note that it is possible for deleted object to reappear. For this to happen the follow…

Best solution for now: don’t restart aerospike.

---

<div class="post-metadata">

**Author:** ![max83](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@max83](https://discuss.aerospike.com/u/max83)\
**Post date:** [August 13, 2015, 7:11am UTC](https://discuss.aerospike.com/t/delete-record-in-aerospike/1619/3 "2015-08-13T07:11:25Z")

</div>

I find a cold-restart-empty option. Have you experience using it? Can it help me?

PS [http://www.aerospike.com/docs/reference/configuration/#cold-start-empty](http://www.aerospike.com/docs/reference/configuration/#cold-start-empty)

---

<div class="post-metadata">

**Author:** ![rbotzer](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/rbotzer/32/2114_2.png) [@rbotzer](https://discuss.aerospike.com/u/rbotzer)\
**Post date:** [August 13, 2015, 2:30pm UTC](https://discuss.aerospike.com/t/delete-record-in-aerospike/1619/4 "2015-08-13T14:30:27Z")

</div>

No, it does not get overwritten by another record. It gets picked up by the evictor and removed completely, it just doesn’t happen immediately. In general, it helps to read the manual:

[https://www.aerospike.com/docs/architecture/#data-storage-layer](https://www.aerospike.com/docs/architecture/#data-storage-layer)[https://www.aerospike.com/docs/architecture/storage.html#eviction-based-on-storage](https://www.aerospike.com/docs/architecture/storage.html#eviction-based-on-storage)

@max83, yes, one solution is to issue an empty cold restart. The index will not be rebuilt from the disk, so no zombies may rise. However, if you have a lot of data it will have to be migrated over. This is similar to an empty new node joining the cluster. The usual cold restart attempts to shorten that process by keeping as much data as is available locally.

You would add the cold-start-empty line inside your namespace config, within the storage device block. Once the configuration file is modified you would issue a cold restart.

---

<div class="post-metadata">

**Author:** ![kporter](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/kporter/32/515_2.png) [@kporter](https://discuss.aerospike.com/u/kporter)\
**Post date:** [October 11, 2016, 7:09pm UTC](https://discuss.aerospike.com/t/delete-record-in-aerospike/1619/5 "2016-10-11T19:09:22Z")

</div>

Aerospike 3.10.0 introduces [durable deletes](http://www.aerospike.com/docs/guide/durable_deletes.html) for Aerospike Enterprise. Learn more about how they work here: [www.aerospike.com/docs/guide/durable\_deletes.html](http://www.aerospike.com/docs/guide/durable_deletes.html).
