[API reference](https://evolu.dev/docs/api-reference) › [@evolu/web](https://evolu.dev/docs/api-reference/web) › createDeleteDatabaseFiles

```ts
function createDeleteDatabaseFiles(
  deps: OpfsRootWithRemoveEntryDep & SqliteWasmLoadDep,
): DeleteDatabaseFiles;
```

Defined in: [packages/web/src/Sqlite.ts:283](https://github.com/evoluhq/evolu/blob/aa223771feea747ffb1b0f5f3271574455633e37/packages/web/src/Sqlite.ts#L283)

Creates the [DeleteDatabaseFiles](https://evolu.dev/docs/api-reference/common/local-first/Db/type-aliases/DeleteDatabaseFiles) of Evolu for the web. It opens the
pool [createWasmSqliteDriver](https://evolu.dev/docs/api-reference/web/functions/createWasmSqliteDriver) opens for the database, waiting for held
files as [createWaitForDatabaseRelease](https://evolu.dev/docs/api-reference/web/functions/createWaitForDatabaseRelease) does, deletes `/evolu1.db` with
its journal, disposes the pool, and removes the pool's directory `.<name>`
with every slot of the pool. A missing file counts as deleted, and so does a
missing directory, which it then doesn't create.

It fails with [DatabaseHeldError](https://evolu.dev/docs/api-reference/common/local-first/Db/interfaces/DatabaseHeldError) when another context still holds a
file of the pool [databaseHeldTimeout](https://evolu.dev/docs/api-reference/common/Sqlite/variables/databaseHeldTimeout) after the first attempt, and
deletes nothing. Any other failure, such as SQLite that failed to load or a
file that could not be deleted, fails with an [UnknownError](https://evolu.dev/docs/api-reference/common/Error/variables/UnknownError), after
which only the pool's disposal still runs.