I know this is an old thread but this thread is at the top of a google search when looking to reduce file size, the command is:
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf
Some things that currently happen while running this command with the current apt-get install ghostscript version:
1: you need to specify a different output file name than the input file name, which is annoying, or else the outputted pdf will be blank / white.
2: if the pdf is not flattened (e.g. there's masked images), you'll get weird output, like missing backgrounds or missing images, what I ended up doing to fix this is using imagemagick's convert to jpg since jpg format doesn't have alpha channel (flat):
convert input.pdf input.jpg
convert input.jpg input.pdf
And then ran the ghostscript snippet above to reduce filesize, and so far that's been working for me well.
Hope this helps someone.