{% include anchor.html title="Delete a database" hash="delete_database"%}
{% highlight js %}
db.destroy([options], [callback])
{% endhighlight %}
Delete the database. Note that this has no impact on other replicated databases.
### Options
* `options.ajax`: (Remote databases only.) Ajax requester options, [as described above](#create_database).
#### Example Usage
{% include code/start.html id="destroy_db" type="callback" %}
{% highlight js %}
db.destroy(function (error) {
if (error) {
return console.log(error);
} else {
// success
}
});
{% endhighlight %}
{% include code/end.html %}
{% include code/start.html id="destroy_db" type="promise" %}
{% highlight js %}
db.destroy().then(function () {
// success
}).catch(function (error) {
console.log(error);
});
{% endhighlight %}
{% include code/end.html %}