Cancel print jobs.
Syntax cancel [ -E ] [ -U username ] [ -a ] [ -h hostname[:port] ] [ -u username ] [ -x ] [ id ] [ destination ] [ destination-id ] Options -a Cancel all jobs on the named destination, or all jobs on all destinations if none is provided. -E Force encryption when connecting to the server. -h hostname[:port] Specify an alternate server. -U username The username to use when connecting to the server. -u username Cancel jobs owned by username. -x Delete job data files in addition to canceling.
Unlike the System V printing system, CUPS allows printer names to contain any printable character except SPACE, TAB, "/", or "#". Also, printer and class names are not case- sensitive.
Administrators wishing to prevent unauthorized cancellation of jobs via the -u option should require authentication for Cancel-Jobs operations in cupsd.conf(5).
Examples
Cancel the current print job:
cancel
Cancel job "myprinter-42":
cancel myprinter-42
Cancel all jobs:
cancel -a
“Effective management always means asking the right question” ~ Robert Heller
Related macOS commands:
lp - Print
lpr - Print files
lprm - Remove jobs from the print queue
lpstat - Printer status information