.. and press ENTER to ask a question on web5, how to write code and more.

Skip to main content

Delete DWN Records

You can delete a record stored in the user's DWN, or another party's DWN (if permission has been granted).

The following snippets allow you to delete from a DWN:

Delete record from the user's local DWN​

const deleteResult = await web5.dwn.records.delete({
message: {
recordId: recordId
},
});

Delete record from a remote DWN​

const response = await web5.dwn.records.delete({
from: did,
message: {
recordId: record.id,
},
});

The value for from is the target DID that you wish to delete the record from.

Connect with us on Discord

Submit feedback: Open a GitHub issue

Edit this page: GitHub Repo

Contribute: Contributing Guide