These tricks require BibTool, which can be installed using homebrew
.
To extract only the used fields call bibtool -x
on a .aux
file, e.g.
bibtool -x doc.aux -o output.bib
To delete fields that you don't want to share, e.g. notes and file locations,
bibtool -- "delete.field {annote}" -i input.bib -o output.bib