The script that does the work is part of the "toolbin" set of programs in the project's source code - unfortunately Ubuntu 10.4 doesn't ship that component with their packaged version of Ghostscript.
You can download the utility from the project's source repository here:
http://git.ghostscript.com/?p=ghostpdl.git;a=blob_plain;f=gs/toolbin/pdfinflt.ps;hb=master (updated 2011-05-16 - Vielen Dank to anon commenter from Darmstadt :)
(the "View raw file" is what you want if you're saving it off).
$ gs -- pdfinflt.ps source.pdf output.pdf
Thanks to Ching-Lan Huang of DigDog Software for the info.
Other tools that achieve this:
- QPDF: qpdf --qdf --object-streams=disable in.pdf out.pdf
- mupdf-tools: pdfclean -d in.pdf out.pdf