Lprm will send a request to the LPD server to remove jobs from a spool queue. (See clean(1)? for an lp(1) compatible interface.) Lprm is normally the only method by which a user may remove a job. The jobs to be removed are specified by the job number or user name; with no specifiers the first removable in a queue will be selected for removal. Usually users may only remove jobs submitted by themselves from the host which originated the original lpr request.
The spool queue is searched first for jobs that the user has permissions to remove, then for jobs that match any of the specified set of tags. If no tags are specified, only the first job in the queue that the user has permissions to remove will be removed. If the -a flag or the all spool queue is specified, lprm will search all available spool queues.
The all wildcard jobid is used to match all jobs in a spool queue; however unless the user has control permissions for the spool queue only the user's jobs will be removed. See the lpd(1)? man page for details about control permissions.
A jobid can be a job number, a user name, a job identifier, or a pattern for a glob based wild card match. This match is applied to the job identifier information.
Remove the last job I submitted if it is in the queue:
Remove job 25 in spool queue p1:
lprm -Pp1 25
Remove job 25 and 30 in spool queue p1:
lprm -Pp1 25 30
Remove all of user john's jobs in spool queue p1:
lprm -Pp1 john
Remove all jobs in spool queue p1:
lprm -Pp1 all
Remove all jobs in all spool queues:
lprm -a all
Remove the jobs with identifier nobody@system in spool queue p1.
Note that the quotes around the pattern are needed to suppress shell glob expansion.
Use authentication specified by the value of the AUTH environment variable.
Remove files from all spool queues available to the user.
Specifies printer queue. By default, the destination printer is taken from the command line dest value, then the environment variables PRINTER, LPDEST, NPRINTER, NGPRINTER, then first entry in the printcap information, and and finally the default_printer entry from the configuration file, and then the compile time default.
Explicitly provide a userid for doing the removal to the LPD server. This can be done only by ROOT or userids listed in the allow_user_setting configuration or printcap option. This facility is provided to allow printing front end systems such as SAMBA to submit job removal requests on behalf of users.
Debugging is controlled using the -D option. This accepts a comma-separated list of debugging settings. These settings take one of two forms: facility=value , or value to set an overall default value.
The following exit values are returned:
The files used by LPRng are set by values in the printer configuration file. The following are a commonly used set of default values.