Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How does one kill a printing job on centOS?

share|improve this question
up vote 2 down vote accepted

There are two command line interfaces to printing:

  • In the BSD interface, use lpr to print, lpq to view pending jobs, lprm to cancel a job.
  • In the System V interface, use lp to print, lpstat to view pending jobs, cancel to cancel ongoing jobs.

There are several printing systems available for Linux and other unices. CUPS is the most common one nowadays. It comes with a System V interface by default, and has a BSD interface that may or may not be installed. If you don't have CUPS and are running Linux or *BSD, you have a BSD system.

Different printing systems have different sets of options and other commands, but they are similar enough for simple cases. To cancel a printing job, use lpq or lpstat (whichever is available, or either if both are available) to see the job number, then lprm or cancel to cancel the job.

With CUPS, if you need to cancel a job really fast, cancel -a will cancel all your pending jobs. Most implementations of lprm will cancel the job currently printing on the default printer if called with no argument.

share|improve this answer

If you are using CUPS, you can manage jobs and do other things via the web interface at http://localhost:631. If you are not using CUPS, there are advantages to doing so, as it is now the printing standard, at least for Linux.

share|improve this answer

That entirely depends on what printing daemon you have installed, although if you're the one who started it, try opening a terminal window and typing lpq to see if the job you want killed is listed. If so, use lprm queuenum where queuenum is the number of the job in the queue that you want killed.

share|improve this answer
thanks for the reply. I tried lpq -a at first, but the system responsed with "no entries". Can you let me know why this happens and how to solve it? Thanks. – bit-question Apr 28 '11 at 19:30
That means that there aren't any entries in its print queue. Are you sure the job is still even on your system? – Shadur Apr 28 '11 at 20:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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