System Administration Guide: Printing

ProcedureHow to Delete a Printer and Remove Printer Access by Using LP Print Commands

  1. Log in as superuser, lp, or assume an equivalent role on a print client with access to the printer that you want to delete.

  2. On the system that is the print client, delete information about the printer.


    # lpadmin -x printer-name
    
    -x

    Deletes the specified printer.

    printer-name

    Specifies the name of the printer you want to delete.

  3. Log in as superuser, lp, or assume an equivalent role on the print server.

  4. On the system that is the printer server, stop accepting print requests for the printer.


    # reject printer-name
    

    reject printer-name rejects print requests for the specified printer.

    This step prevents any new requests from entering the printer's queue while you are in the process of removing the printer. For a detailed description, see How to Accept or Reject Print Requests for a Printer.

  5. On the system that is the print server, stop the printer.


    # disable printer-name
    

    This step stops print requests from printing. For a detailed description on how to stop printing, see How to Enable or Disable a Printer.

  6. Move any print requests that are still in the queue to another printer.

    For information about how to move print requests to another printer, see How to Move Print Requests to Another Printer.

  7. On the system that is the print server, delete the printer.


    # lpadmin -x printer-name
    
  8. Verify that the printer information has been deleted:

    1. Confirm that the printer information has been deleted on the print client.


      $ lpstat -p printer-name -l
      

      In the command output, you should receive an error indicating that the printer does not exist.

    2. Confirm that the printer information has been deleted on the print server.


      $ lpstat -p printer-name -l
      

      In the command output, you should receive an error indicating that the printer does not exist.


Example 5–12 Deleting a Printer and Remote Printer Access

The following example shows how to delete the printer luna from the print client terra and from the print server jupiter. This example also shows how to delete the print client terra from the print server.


terra# lpadmin -x luna
Removed “luna”.
terra# lpstat -p luna -l 
jupiter# lpadmin -x luna
Removed “terra”.
jupiter# lpstat -p luna -l