LinuxCommandLibrary

cancel

TLDR

Cancel the current print job on the default printer

$ cancel
copy
Cancel a specific print job by ID
$ cancel [job_id]
copy
Cancel a print job on a specific printer
$ cancel [printer_name]-[job_id]
copy
Cancel all print jobs on a specific printer
$ cancel -a [printer_name]
copy
Cancel all print jobs on all printers
$ cancel -a
copy
Cancel all jobs owned by a specific user
$ cancel -u [username]
copy

SYNOPSIS

cancel [-E] [-U username] [-a] [-h hostname[:port]] [-u username] [-x] [id] [destination] [destination-id]

DESCRIPTION

cancel is a CUPS command that cancels print jobs. Without arguments, it cancels the currently printing job on the default destination. Jobs can be specified by job ID, destination printer, or both.
Job IDs are assigned by the print system and can be viewed with lpstat. The destination-id format combines the printer name and job ID (e.g., "myprinter-42").

PARAMETERS

-a

Cancel all jobs on the specified destination, or all destinations if none specified
-E
Force encryption when connecting to the server
-h hostname[:port]
Specify alternate server
-u username
Cancel jobs owned by the specified user
-U username
Specify the username for authentication
-x
Delete job data files in addition to canceling

CAVEATS

The -a and -u options require administrative privileges. These restrictions are controlled by operation policies in cupsd.conf for "Cancel-Jobs" and "Cancel-My-Jobs" operations.
CUPS printer names can contain any printable character except SPACE, TAB, "/", or "#", and are case-insensitive.

SEE ALSO

lpr(1), lprm(1), lpstat(1), lp(1)

Copied to clipboard