This will create the outfile.pdf with all but the last page in infile.pdf
pdftk infile.pdf cat 1-r2 output outfile.pdf
Explanation of parameters
infile.pdfis the original pdf filecatis the operation1-r2is the page range-
You can reference page numbers in reverse order by prefixing them with the letter r. For example, page r1 is the last page of the document, r2 is the next-to-last page of the document, and rend is the first page of the document. You can use this prefix in ranges, too, for example r3-r1 is the last three pages of a PDF.
-
outputwill output it to a specific fileoutput.pdfis the output pdf file
More examples are here: https://www.pdflabs.com/docs/pdftk-cli-examples/