If you don't have the request ID, get it from
lpstat or
lpq.
Then use cancel or
lprm.
Specifying the request ID cancels the request, even if it is currently
printing:
$ cancel laserp-575
request "laserp-575" cancelled
To cancel whatever request is currently printing, regardless of its
ID, simply enter cancel and the printer
name:
$ cancel laserp
request "laserp-573" cancelled
The lprm program will cancel the
active job if it belongs to you.
Otherwise, you can give job numbers as arguments, or use a dash
(-) to remove all of your jobs:
$ lprm 575
dfA575diamond dequeued
cfA575diamond dequeued
lprm tells you the actual filenames
removed from the printer queue (which you probably don't need).