How to clear the CUPS print queue

To cancel a print job in the queue just use cancel. To see all the available jobs in the queue just use lpstat.

$ lpstat -o
HP-Officejet-7610-2-128 user2     240640   mié 09 mar 2016 11:07:14 CET
HP-Officejet-Pro-8620-137 jose             55296   dom 03 jul 2016 13:29:49 CEST
$ cancel -a HP-Officejet-7610-2-128
$ cancel -a HP-Officejet-Pro-8620-137