Lprm

lprm removes print requests from the print queue and reports the file's name of the removed request.

In situations when running this command is not enough to cancel a print job, one may also need to kill the printing filter. The filter may be magicfilter, foomatic-rip, cupsomatic, or apsfilter, depending on the computer's configuration. Alternatively, one may need to look for a hung instance of stdout and kill that process instead.

# lprm # ps aux | grep "foo" 300 12:00 /usr/bin/foomatic-rip 400 12:12 grep xterm # killall foomatic-rip

If users need to do this frequently, an admin can put this kill command into a small script (say under /usr/local/bin), give it execute permissions, then configure the sudo command in order to grant it to normal users.