cancel

cancel CUPS print jobs

TLDR

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

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

CONFIGURATION

/etc/cups/cupsd.conf

CUPS server configuration including operation policies that control Cancel-Jobs and Cancel-My-Jobs permissions.
/etc/cups/printers.conf
Printer definitions and queue settings.

INSTALL

sudo apt install lprng
sudo dnf install cups-client
sudo apk add cups-client
sudo zypper install cups-client

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

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