I found much easier solution, pdftk A=oldpdf.pdf cat A output newpdf.pdf. This removes all metadata and also the attachments.
Yes but in my case the pdf file is big and I libreoffice draw hangs. Also i found another solution (added that to post).
I am talking about removing them from pdf. For extracting them this works pdftk [pdf_file.pdf] unpack_files.
it's not left it's middle