How do I clear a Print-queue in Ubuntu?

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


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


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.

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.