LinuxCommandLibrary

lprm

cancel print jobs

TLDR

Cancel current job on the default printer

$ lprm
copy


Cancel a job of a specific server
$ lprm -h [server[:port]] [job_id]
copy


Cancel multiple jobs with a encrypted connection to the server
$ lprm -E [job_id1 job_id2 ...]
copy


Cancel all jobs
$ lprm -
copy


Cancel the current job of a specific printer or class
$ lprm -P [destination[/instance]]
copy

SYNOPSIS

lprm [ -h hostname[:port] ] [ -E ] [ -U username ] [ -P destination[/instance] ] [ - ] [ job-id(s) ]

DESCRIPTION

lprm cancels print jobs that have been queued for printing. If no arguments are supplied, the current job on the default destination is canceled. You can specify one or more job ID numbers to cancel those jobs or use the - option to cancel all jobs.

OPTIONS

The lprm command supports the following options:

-E

Forces encryption when connecting to the server.

-P destination[/instance]

Specifies the destination printer or class.

-U username

Specifies an alternate username.

-h server[:port]

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

CONFORMING TO

The CUPS version of lprm is compatible with the standard Berkeley command of the same name.

EXAMPLES

Cancel the current job on the default printer:


    lprm

Cancel job 1234:


    lprm 1234

Cancel all jobs:


    lprm -

COPYRIGHT

Copyright © 2021-2023 by OpenPrinting.

SEE ALSO

cancel(1), lp(1), lpq(1), lpr(1), lpstat(1), CUPS Online Help (http://localhost:631/help)

Copied to clipboard