Delete a print job from the print queue
lprm command is used to delete print tasks in the print queue. Unfinished printer tasks will be placed in the printer storage queue. This command can be used to cancel tasks that are often not sent to the printer.
lprm(options)(parameters)
-E: Force encryption when connecting to the print server;
-P: Specify the target printer to accept the print task;
-U: Specify an optional username.
Print task: Specify the print task number to be deleted.
Remove task No. 102 from the printer hpprint:
lprm -Phpprint 102
Remove task No. 101 from the default printer:
lprm 101