You can cancel your print job with the lprm or cancel command.

If you have sent a job to the printer that you want to cancel, you can remove it from the print queue using either the lprm or cancel commands, depending on whether you have a System Vor BSD-derived version of UNIX.

On a BSD-derived system, use the lprm command with the printer job number. For example, suppose a mythical user named Lois uses the lpq command and discovers that she sent a job twice:

% lpq
emu is ready and printing
Rank    Owner Job   Files            Total Size
active  bob   420   RELNOTES.ps      138331 bytes
1st     bob   421   standard input   13284 bytes
2nd     lois  422   standard input   1928 bytes
3rd     lois  423   standard input   1928 bytes

Rather than waste paper, she chooses to remove one of the identical print jobs. She uses the job number reported by lpq and applies that to the lprm command:

% lprm 422
dfA422ruby dequeued
cfA422ruby dequeued

If she had decided to delete both print jobs on her default printer , she could omit the job number:

Get WYNTK: UNIX System Admininistrator now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.