LPRM(1)
๐ LPRM โ the lprm(1) glow-up ๐
ok so bestie, welcome to lprm, section 1 of the General Commands Manual. this is the manual page, and i'm gonna walk you through it like we're texting at 2am. grab a snack ๐
โจ NAME โจ
lprm โ remove jobs from the line printer spooling queue ๐๏ธโจ
๐ธ SYNOPSIS ๐ธ
lprm [-] [-Pprinter] [[job# ...] [user ...]]
that's the whole vibe right there. short, iconic, does exactly what it says. ๐
๐ฆ DESCRIPTION ๐ฆ
okay so here's the tea: lprm will remove a job, or jobs, from a printer's spool queue. and here's why that matters โ the spooling directory is protected from users, so using lprm is normally the only method by which a user may remove a job. like, that's your one door. ๐
and who even owns a job? the owner is determined by the user's login name and host name on the machine where the lpr(1) command was invoked. so it's tied to where you were when you sent it, not where you are now. noted. ๐
๐ Options and arguments:
-Pprinterโ specify the queue associated with a specific printer (otherwise the default printer is used). be specific, bestie.-โ if a single-is given,lprmwill remove all jobs which a user owns. and if the superuser employs this flag, the spool queue will be emptied entirely. ๐ that's a lot of power, no cap.userโ causeslprmto attempt to remove any jobs queued belonging to that user (or users). this form of invokinglprmis useful only to the superuser. ๐job#โ a user may dequeue an individual job by specifying its job number. this number may be obtained from thelpq(1)program, e.g.,
% lpq -l
1st:ken [job #013ucbarpa]
(standard input) 100 bytes
% lprm 13
see how we pulled 13 out of that [job #013ucbarpa]? that's the move. ๐
if neither arguments or options are given, lprm will delete the currently active job if it is owned by the user who invoked lprm. it just... knows. ๐ฎ
lprm announces the names of any files it removes and is silent if there are no jobs in the queue which match the request list. so if it says nothing? that's not shade, that's just an empty match. ๐ญ
and here's the lil behind-the-scenes moment: 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. so it's not gone-gone, it's just respawning. ๐ฅ
๐ ENVIRONMENT ๐
if the following environment variable exists, it is utilized by lprm:
PRINTERโ if the environment variablePRINTERexists, and a printer has not been specified with the-Poption, the default printer is assumed fromPRINTER. โจ
๐ง FILES ๐ง
/etc/printcapโ Printer characteristics file./var/spool/output/*โ Spooling directories./var/spool/output/*/lockโ Lock file used to obtain the PID of the current daemon and the job number of the currently active job.
๐ DIAGNOSTICS ๐
Permission deniedโ Printed if the user tries to remove files other than his own. ๐ซ bestie, those aren't yours.
๐ซถ SEE ALSO ๐ซถ
the whole friend group, fr fr. ๐
๐ HISTORY ๐
The lprm command appeared in 3.0BSD. an icon from the start, honestly. โญ
๐ญ BUGS ๐ญ
Since there are race conditions possible in the update of the lock file, the currently active job may be incorrectly identified. > โ ๏ธ so yeah, that's a real caveat โ sometimes it might point at the wrong job. not a vibe, but it's documented, so we move.
and that's the page!! ๐ this one's from the Debian crew, dated May 31, 2007 โ like, vintage, but the info still eats. go clear that queue, bestie. ๐๐ฆโจ
๐ฆ where this page comes from
- debian bookworm: lpr 1:2008.05.17.3+nmu1
- debian trixie: lpr 1:2008.05.17.3+nmu3.1 ยท BSD-3-Clause
- ubuntu jammy: lpr 1:2008.05.17.3+nmu1
- ubuntu noble: lpr 1:2008.05.17.3+nmu1
- ubuntu questing: lpr 1:2008.05.17.3+nmu3.1
- ubuntu resolute: lpr 1:2008.05.17.4 ยท BSD-3-Clause
- ubuntu stonking: lpr 1:2008.05.17.4 ยท BSD-3-Clause
- Copyright (c) 1983, 1990, 1993 The Regents of the University of California. All rights reserved
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms