LinuxCommandLibrary

cancel

cancel jobs

TLDR

Cancel the current job of the default printer (set with lpoptions -d {{printer}})

$ cancel
copy


Cancel the jobs of the default printer owned by a specific [u]ser
$ cancel -u [username]
copy


Cancel the current job of a specific printer
$ cancel [printer]
copy


Cancel a specific job from a specific printer
$ cancel [printer]-[job_id]
copy


Cancel [a]ll jobs of all printers
$ cancel -a
copy


Cancel [a]ll jobs of a specific printer
$ cancel -a [printer]
copy


Cancel the current job of a specific server and then delete ([x]) job data files
$ cancel -h [server] -x
copy

SYNOPSIS

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

DESCRIPTION

The cancel command cancels print jobs. If no destination or id is specified, the currently printing job on the default destination is canceled.

OPTIONS

The following options are recognized by cancel:

-a

Cancel all jobs on the named destination, or all jobs on all destinations if none is provided.

-E

Forces encryption when connecting to the server.

-h hostname[:port]

Specifies an alternate server. Note: This option must occur before all others.

-U username

Specifies the username to use when connecting to the server.

-u username

Cancels jobs owned by username.

-x

Deletes job data files in addition to canceling.

CONFORMING TO

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.

EXAMPLES

Cancel the current print job:


    cancel

Cancel job "myprinter-42":


    cancel myprinter-42

Cancel all jobs:


    cancel -a

NOTES

Administrators wishing to prevent unauthorized cancellation of jobs via the -u option should require authentication for Cancel-Jobs operations in cupsd.conf(5).

COPYRIGHT

Copyright © 2021-2023 by OpenPrinting.

SEE ALSO

cupsd.conf(5), lp(1), lpmove(8), lpstat(1), CUPS Online Help (http://localhost:631/help)

Copied to clipboard