Dexie Logo
Documentation

Dexie.delete()

Syntax

Delete database and leave it closed:
db.delete();
Delete database and recreate it whenever the db instance is accessed again:
db.delete({disableAutoOpen: false}); // dexie@4 or later
Delete another database (Static method):
Dexie.delete('database_name');

Return Value

Description

Deletes the database. If the database does not exist (db.open() was never called) this method will also succeed.

Sample

db.delete().then(() => {
    console.log("Database successfully deleted");
}).catch((err) => {
    console.error("Could not delete database");
}).finally(() => {
    // Do what should be done next...
});

© 2014-2025 Awarica AB

Made with love for great people.

Read Terms & Conditions and Privacy Policy.