CUPS Printer cancel all pending jobs

[root@app1 ~]# lpq
SPDDCNPH09 is ready
no entries
[root@app1 ~]# lpstat -o
SPLDPHCA02-1994129 applprod 2048 Wed 18 Jan 2017 11:24:54 AM GST
DPDDCNPH03-1994219 applprod 2048 Wed 18 Jan 2017 11:28:03 AM GST
NWADCNPH20-1994345 applprod 2048 Wed 18 Jan 2017 11:33:39 AM GST
KHADCNPH03-1994530 applprod 2048 Wed 18 Jan 2017 11:41:02 AM GST
SPLDIPPH01-1994538 applprod 2048 Wed 18 Jan 2017 11:42:32 AM GST
SPLDCNPH10-1994642 applprod 2048 Wed 18 Jan 2017 11:46:41 AM GST
[root@app1 ~]# cancel -a
[root@app1 ~]# cancel 1994129
cancel: cancel-job failed: Job #1994129 does not exist!
[root@app1 ~]# lpstat -o
HPDDCNPH06-1994947 applprod 2048 Wed 18 Jan 2017 12:00:42 PM GST
[root@app1 ~]# cancel 1994947
…………………………………………………………..
lpstat -o #to view outstanding print jobs.
cancel -a {printer} # To cancel ALL jobs or …
cancel {printerjobid} # To cancel 1 job.

Leave a Reply

Your email address will not be published. Required fields are marked *