System Administration Guide, Volume 2

How to Cancel a Print Request

  1. If you are going to cancel print requests of other users, become superuser or lp.

  2. Determine the request IDs of the print requests to cancel by using the lpstat command.

    See "How to Check the Status of Print Requests" for more details.

  3. Cancel a print request by using the cancel command.


    $ cancel request-id | printer-name
    

    request-id

    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 quotes.

    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 quotes. 

  4. Verify the print requests are canceled.


    $ lpstat -o printer-name
    

Examples--Canceling a Print Request

In the following example, the command cancels the luna-3 and luna-4 print requests.


$ cancel luna-3 luna-4
request "luna-3" cancelled
request "luna-4" cancelled

In the following example, the command cancels the print request that is currently printing on the printer luna.


# cancel luna
request "luna-9" cancelled