System Administration Guide: Printing

ProcedureHow to Cancel a Print Request

  1. If you are going to cancel the print requests of other users, then become superuser, lp, or assume an equivalent role.

  2. Determine the request IDs of the print requests to cancel.


    # lpstat 
    

    For more details, see How to Check the Status of Print Requests.

  3. Cancel the print request.


    # cancel request-id | printer-name
    
    request-id

    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.

    printer-name

    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.

  4. Verify that the print requests are canceled.


    $ lpstat -o printer-name
    

Example 8–7 Canceling a Print Request

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