martpet
martpet2y ago

Clear local KV store

How do I delete/clear the local database?
1 Reply
cdoremus
cdoremus2y ago
Run the following in a local repl using the --unstable flag:
const kv = await Deno.openKv();
const rows = kv.list({prefix:[]});
for await (const row of rows) {
kv.delete(row.key);
}
const kv = await Deno.openKv();
const rows = kv.list({prefix:[]});
for await (const row of rows) {
kv.delete(row.key);
}