I use qpdf for this:<p>to keep only pages 1-9 and pages 26 to the last page of input.pdf and save them to output.pdf.<p>qpdf input.pdf --pages . 1-9,26-z -- output.pdf<p>keep the first page and pages 100-292<p>qpdf input.pdf --pages . 1-1,100-292 -- output.pdf<p>The page range is a set of numbers separated by commas, ranges of
numbers separated dashes, or combinations of those.<p>The character "z" represents the last page.