If you send a job to a printer and it isn't what you wanted, you can cancel it. This is common in times when you are rushing and you press Print and realize, “I didn't want to do that.” Now, you don't have to be a tree-killing-paper-ream-eating-user, and you can quickly stop that wasteful 1,000-page print job you didn't mean to send. The lprm command enables you to remove items from the printer queue. This is how you use it:
If you need to use lprm, follow these steps:
Use the lpq command to find the job ID number that you want to remove.
Invoke lprm with the following syntax: lprm -P<printer name> <job ID>.
For example, if you wanted to remove job #15 from the queue in the printer pr1, you can type
>lprm –Ppr1 15