Linux lprm Command
The Linux lprm command is used to remove a job from the printer queue
Unfinished print jobs are placed in the printer queue, and this command can be used to cancel jobs that have not yet been sent to the printer. Since each printer has its own queue, you can use the -P option to specify the target printer. If not specified, the system default printer is used.
This command checks whether the user has sufficient permission to remove the specified file. In general, only the file owner or the system administrator has this permission.
Syntax
/usr/bin/lprm [P] [file...]
Example
Remove job number 1123 from the printer hpprinter
lprm -Phpprinter 1123
Remove job number 1011 from the default printer
lprm 1011
Linux Command Reference