If you are going to cancel the print requests of other users, then become superuser, lp, or assume an equivalent role.
Determine the request IDs of the print requests to cancel.
# lpstat |
For more details, see How to Check the Status of Print Requests.
Cancel the print request.
# cancel request-id | printer-name |
Specifies the request ID of a print request to be canceled. You can specify multiple request IDs with this command. Use a space or a comma to separate request IDs. If you use spaces, enclose the list of request IDs in quotation marks.
Specifies the printer for which you want to cancel the currently printing print request.
You can specify multiple printer names with this command. Use a space or a comma to separate printer names. If you use spaces, enclose the list of printer names in quotation marks.
Verify that the print requests are canceled.
$ lpstat -o printer-name |
The following example shows how to cancel the luna-3 and luna-4 print requests.
$ cancel luna-3 luna-4 request "luna-3" cancelled request "luna-4" cancelled |
The following example shows how to cancel the print request that is currently printing on the printer luna.
# cancel luna request "luna-9" cancelled |