martpet
martpet13mo ago

Clear local KV store

How do I delete/clear the local database?
1 Reply
cdoremus
cdoremus13mo 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);
}