sudo apt-get install pdftk
To rotate page 1 by 90 degrees clockwise:
pdftk in.pdf cat 1east output out.pdf
To rotate all pages clockwise:
pdftk in.pdf cat 1-endeast output out.pdf
From the "man" page
The page rotation setting can cause pdftk to rotate pages and documents. Each option sets the page rotation as follows (in degrees): north: 0, east: 90, south: 180, west: 270, left: -90, right: +90, down: +180. left, right, and down make relative adjustments to a page's rotation.
To rotate page 1 by 90 degrees clockwise:
pdftk in.pdf cat 1east output out.pdf
To rotate all pages clockwise:
pdftk in.pdf cat 1-endeast output out.pdf
From the "man" page
The page rotation setting can cause pdftk to rotate pages and documents. Each option sets the page rotation as follows (in degrees): north: 0, east: 90, south: 180, west: 270, left: -90, right: +90, down: +180. left, right, and down make relative adjustments to a page's rotation.