LPRM(1) — UNIX Programmer’s Manual
NAME
lprm − remove job(s) from the spool queue
SYNOPSIS
lprm [−Pprinter] [−] [job # ...] [user ...]
DESCRIPTION
lprm will remove a job, or jobs, from a printer spool queue. Since the spooling directory is protected from users, using lprm is normally the only method by which a user may remove a job.
lprm without any arguments will perform one of two possible actions, depending on whether the currently active job is owned by the user who invoked lprm. If the currently active job is owned by the user, that job alone is removed from the spool queue. If the job is not owned by the user, lprm will remove all jobs currently in the queue which are owned by the user.
If the − flag is specified, lprm will remove all jobs which a user owns. If the super-user employs this flag, the spool queue will be emptied entirely. Note that using the − flag will remove any files associated with a user. In this way a user may cleanse the spool queue of any rubbish which might have been left there.
Specifying a user’s name, or list of user names, will cause lprm to attempt to remove any jobs queued belonging to that user (or users). This form of invoking lprm is useful only to the super-user.
A user may dequeue an individual job by specifying its job number. This number may be obtained from the sq(1) program, e.g.
% lpq -l
1st: ken [job #908]
(standard input) 100 bytes
% lprm 908
lprm will announce the names of any files it removes. If the spool queue is empty, the message "no entries" will be given.
lprm will kill off an active daemon, if necessary, before removing any spooling files. If a daemon is killed, a new one is automatically restarted upon completion of file removals.
The −P option may be usd to specify the queue associated with a specific printer (otherwise the default printer, or the value of the PRINTER variable in the environment is used).
FILES
/etc/printcap printer characteristics file
/usr/spool/* spooling directories
/usr/spool/*/lock lock file used to find out the pid
of the current daemon and the job
number of the currently active job
/usr/lib/* daemon to restart
SEE ALSO
BUGS
Since there are race conditions possible in the update of the lock file, the currently active job may be incorrectly identified.
7th Edition