HP-UX System Administrator's Guide: Routine Management Tasks

been removed and users try to send a request, they will see the message
Destination printer_name non-existent”. See “Controlling the Flow of
Print Requests” (page 164).
6. (Optional): Determine if there are any jobs in the printers queue. For example:
/usr/bin/lpstat -o laser1
7. (Optional): Disable the printer to be removed. For example:
/usr/bin/disable -r"Printer laser1 is disabled." laser1
You would issue the above disable command if there are jobs in the printers
queue and you do not want to wait for them to print before removing the printer.
Issuing the disable command shuts the printer down in an orderly manner.
For more information, see “Enabling or Disabling a Printer” (page 165). Note that
you can also specify the -c option to the disable command to cancel all print
requests for the printer.
8. (Optional): If there are no jobs in the printers queue, go on to Step 9. If there are
jobs, decide whether to move all pending print requests in the request directory
to another printer request directory or to cancel any requests. For example, to move
print requests:
/usr/sbin/lpmove laser1 laser2
To cancel any requests:
/usr/bin/cancel laser1
9. Remove the printer from the LP spooler. For example:
/usr/sbin/lpadmin -xlaser1
10. Restart the LP spooler:
/usr/sbin/lpsched
See lpshut(1M), lpadmin(1M), and lpsched(1M) for details on the command options.
Removing a Printer from a Printer Class
Read HP-UX System Administrator’s Guide: Overview to familiarize yourself with this
concept.
NOTE: You cannot use HP SMH to remove a printer from a class.
Using HP-UX commands
1. Ensure that you have superuser capabilities.
2. Stop the LP spooler:
/usr/sbin/lpshut
176 Managing Printers