babakfpB
Denoβ€’2y agoβ€’
3 replies
babakfp

How to delete all data of a `Deno.Kv` DB file?

Hi πŸ‘‹
Is there a way to delete all content inside a db file in openKv?

Doing this doesn't work:
const keys = kv.list({ prefix: [] })
for await (const entry of keys) {
    await kv.delete(entry.key)
}


After running that and kv.list({ prefix: [] }) the length of it would be
0
but there are like 300 lines of stuff inside the DB file.
Was this page helpful?