54

I am an absolute beginner with Ubuntu and I appear to have a long queue of documents in my H.P. 840C printer.

91

The question was how to kill all jobs. The simple way to kill all jobs:

lprm -

The complicated linux old-school way is below:

Command line:

lpstat -o

to view outstanding print jobs.

cancel -a {printer}

to cancel ALL jobs or ...

cancel {printerjobid}

to cancel 1 job.


man page cancel

  • 1
    When I entered the code in the command -line a list of Print-jobs was shown.When I then entered $ cancel -a(printer) the next command-line showed :- bash:syntax error near unexpected token "(" – Norman Woodcock Sep 26 '13 at 15:42
  • hmm that is weird. are you sure you inserted a printer id? – Rinzwind Sep 26 '13 at 16:55
  • Didn't work for me. :( – some_other_guy May 30 '14 at 11:15
  • Hi, this didn't work for me either. Deleting the printer and adding it again did the task, though. – João Silva Jun 9 '15 at 8:49
  • MAGIC : ) Guys who aren't having success, step 2 above? The readout from lpstat -o should look something like <yourusername_printername>. Just type that verbatim into {printer} in step 2. Worked fine in Ubuntu 15.04. Tnx Rinzwind :) – Manuel Dec 5 '15 at 6:46
18

Either

  1. Use the printer dialog: type "Printers" in the dash and navigate to the printer
  2. Use the CUPS web interface: point your browser at http://localhost:631/jobs/ and proceed from there
  3. Use the command line interface: use lpq to see jobs, lprm to remove. Refer to man lprm for more information.
  • Is there something like lprm * that will cancel all jobs? Or do we have to go piecemeal? – MichaelChirico Apr 30 '15 at 3:15
  • @MichaelChirico man lprm | grep "cancel all jobs" – zwets Feb 12 '16 at 8:16
8

Use

lpstat -W completed -o

to view list of completed jobs.
Use

lpstat -o

to view list of not-completed jobs.

And to delete job list,just use this command:

cancel -a -x

This will cancel all pending jobs, as well as deleting them.

  • 1
    This should be the accepted answer. – vcarel Mar 4 '18 at 16:54
2

Well, answers given here didn't work for me so here's what I did -

ps aux | grep printer
kill {printer job}

protected by Community Dec 14 '17 at 8:05

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.