The deleteref command accepts one or more reference IDs as its argument to specify the references you want to get rid of. This is quite straightforward if you want to delete one or two references. But what if you have a disjoint list of 17 references, e.g. all publications of an author who was convicted to be fraudulent? A useful strategy to delete such references is to save a query with the getref command to a file and use it as a list of ID values for a subsequent run of deleteref. This way you can verify by inspecting the file that you will delete the correct references. Use the -s ID
option to request minimal datasets containing the ID value instead of the citation key in the ID field.
To stick with the example of the fraudulent author, we assume his name is, as in so many examples, John Doe (apologies to all RefDB users with that name).
First we select all his publications from the database bar, request only the ID, and save the result in an intermediate file:
refdbc: getref -t ris -s ID -o tobekilled.ris -d bar ":AU:=Doe,J." |
The result is, once again, a file with plain text that we can check and edit to our needs. E.g. if you want to keep one or two publications in the list, just delete their entries in the intermediate file.
Then we use the deleteref command to actually delete the references associated with our list of IDs:
refdbc: deleteref -f tobekilled.ris -d bar |