9

I am working with an old CentOs version (5.0) that is not really my machine.

Recently, for some dark reasons, I have problems in printing.

The jobs rest in queue, and I cannot cancel them from the bar icon.

I have tried with some terminal commands (cancel -a ask for a password, which I don't have, lpq -a, and other things of what I don't really know the meaning), but the job is still stuck at the printer icon.

Do you have any suggestions?


The image explains my situation and how the first answer can not fix this.

crony is the name of another printer, while the one I use is crust.

enter image description here

  • 1
    If you have CUPS web-interface running I'd try to cancel a print job from there. Usually it works for me localhost:631 – UVV Jul 10 '14 at 6:14
14

To cancel a print job :

  1. List all jobs:

    lpq 
    Rank   Owner/ID              Class  Job Files       Size Time 
    active bob                   A      11  zarma.txt   8000 10:12:10
    
  2. Delete the job by it's id, which is 11 here:

    lprm 11
    

You must be root to delete jobs that you don't have initiated.

If the printer is not the default printer, add the -P option, e.g.

    lpq -P crust
    lprm -P crust …

Supposing that :

If lpq didn't show any printing jobs, it is because they are no more in the queue.

If as shown by the screen copy the printer status is unknown, perhaps the line remains because the tool is missing the printing status.

Perhaps the job has already been submitted and the job will be cancelled, when the communication with the printer is established.

Is it a link problem or is the printer down?

  • Thanks for your post, but it does not work. I have edited my post to explain it better. – Py-ser Jul 10 '14 at 6:21
  • @Py-ser To select which printer to act on, use the -P option (see my edit) – Gilles 'SO- stop being evil' Jul 10 '14 at 22:57
  • @Gilles, it is not a matter of selection, it is a matter that the lpq command does not see any job in queue, but the printer window does! – Py-ser Jul 11 '14 at 0:43
  • @Py-ser By running lpq with no argument, you ask it to list the jobs on the default printer, which for you is crony. So it doesn't show any job. There is no contradiction with the printer window which shows a job on a different printer (crust). – Gilles 'SO- stop being evil' Jul 11 '14 at 0:46
  • @Gilles, I see. So how can I print on terminal the jobs of another printer? I tried lpq -P crust, but the output is the same (with just a different printer name). – Py-ser Jul 11 '14 at 0:54
1

Just for others that end up here:

On new linux versions, there works the simple command cancel:

The cancel command cancels print jobs. If no destination or id is specified, the currently printing job on the default destination is canceled.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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