Stop printer jobs from terminal

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

Asked By: Py-ser


To cancel a print job :

  1. List all jobs:

    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?

Answered By: Emmanuel

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.

Answered By: rubo77
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.