Delete data from pod with RDFlib


I am trying to figure out how to remove unwanted triples from my solid pod and cant really seem to find any examples in the documentation. Whats the best way to delete multiple triples from my pod using rdflib? Thanks.


I would recommend you check out UpdateManager in rdflib.js. UpdateManager lets you take two arrays, an array of insertions and an array of deletions. You can see some examples of adding/removing data on the Manipulating Data with Rdflib.js docs.

Specifically, you’ll need to create an array of statements using rdflib.js (which is something like $, predicate, object); ), then pass that array to the UpdateManager.update call, which will delete those triples for you.