Use ghostscript:
$ gs -sDEVICE=pdfwrite \
-dCompatibilityLevel=1.4 \
-dPDFSETTINGS=/ebook \
-dNOPAUSE \
-dBATCH \
-dColorImageResolution=150 \
-sOutputFile=gutter.pdf GutterMagic.pdf
Or use the ghostscript utilities for PDFs:
$ pdf2ps -dLanguageLevel=3 GutterMagic.pdf
$ ps2pdf -dPDFSETTINGS=/ebook -sOutputFile=gutter.pdf GutterMagic.ps
Greg Pittman. "Shrink PDF size with this command line trick". opensource.com, 18 August 2020, https://opensource.com/article/20/8/reduce-pdf