Exiftool

Remove metadata from JPEG


exiftool -all= example.jpg

Modify PDF metadata


exiftool file.pdf -Title="Animal Farm" -Author="George Orwell"