lpq Command on POWER-based Platform
The lprm command includes information for lprm on a POWER-based platform and the System V Print Subsystem lprm on an POWER-based and Itanium-based platforms.
lprm Command on POWER-based Platforms
Removes jobs from the line printer spooling queue.
lprm [ -P Printer ] [ JobNumber ] [ UserName ... ] [ - ]
The lprm command removes one or more jobs from the spool queue of a printer.
You cannot run the lprm command without specifying a job number, the - (minus sign) flag, or at least one user name.
Specifying a UserName parameter, or list of names, causes the lprm command to attempt to remove any jobs queued belonging to that user (or users).
You can remove an individual job from a queue by specifying its JobNumber. This job number is obtained by using the lpq command.
|-||Removes all jobs a user owns. Someone with root user authority can use this flag to remove all jobs from a queue. This flag is not valid for remote print.|
|-P Printer||Specifies the queue associated with a specific Printer
variable. If this flag is not specified, the following conditions
Note: Any destination command line options override both the LPDEST and the PRINTER environment variables.
|/usr/bin/lprm||Contains the lprm command.|
|/etc/qconfig||Contains the configuration file.|
The lpq command, lpr command, qcan command.
Canceling a Print Job (qcan Command) in AIX 5L Version 5.1 System User's Guide: Operating System and Devices.
lprm Command on POWER-based and Itanium-based Platforms
Note: This is a System V Print Subsystem command.
(BSD) Remove jobs from the printer queue
/usr/bin/lprm [-Pprinter] [-] [job # ...] [username...]
The lprm command removes a job or jobs from a printer's spooling queue. Since the spool directory is protected from users, using lprm is normally the only method by which a user can remove a job.
Without any arguments, lprm deletes the job that is currently active, provided that the user who invoked lprm owns that job.
When the privileged user specifies a username, lprm removes all jobs belonging to that user.
You can remove a specific job by supplying its job number as an argument, which you can obtain using lpq. For example:
lpq -Phost host is ready and printing Rank Owner Job Files Total Size active wendy 385 standard input 35501 bytes lprm -Phost 385
lprm reports the names of any files it removes, and is silent if there are no applicable jobs to remove.
lprm Sends the request to cancel a job to the print spooler, LPSCHED.
An active job may be incorrectly identified for removal by an lprm command issued with no arguments. During the interval between an lpq command and the execution of lprm, the next job in queue may have become active; that job may be removed unintentionally if it is owned by you. To avoid this, supply lprm with the job number to remove when a critical job that you own is next in line.
Only the privileged user can remove print jobs submitted from another host.
The lp command, lpq command, lpr command, and lpsched command.