Skip to content

lprm MacOS command

The MacOS lprm command allows users to remove print jobs from the print queue quickly and efficiently. By using this command, users can easily cancel print jobs that are no longer needed or stuck in the queue. This can help streamline the printing process and prevent any unnecessary waste of resources. The lprm command is a powerful tool for managing print jobs on MacOS systems and can be especially useful in busy office environments where multiple print jobs are being processed simultaneously.

lprm Syntax:

Terminal window
lprm [options] [job ID]

lprm Options:

OptionDescription
-EForce encryption when connecting to the server.
-USpecifies a username for canceling print jobs.
-PSpecifies the destination printer.
-hSpecifies the hostname of the print server.

lprm Usage Warning:

Parameters:

ParameterDescription
job IDThe ID of the print job to be canceled.

lprm Command Usage Examples:

Remove a Specific Print Job

Terminal window
lprm 123

Remove the print job with job ID 123 from the print queue.

Remove All Print Jobs

Terminal window
lprm -

Remove all print jobs from the print queue.

Remove Print Jobs by User

Terminal window
lprm -u john

Remove all print jobs from the print queue submitted by the user “john”.

Remove Print Jobs by Destination Printer

Terminal window
lprm -P printer1

Remove all print jobs from the print queue directed to the printer “printer1”.

Remove Print Jobs by Multiple Options

Terminal window
lprm -u john -P printer1

Remove all print jobs from the print queue submitted by the user “john” and directed to the printer “printer1”.

How do I cancel a specific print job using lprm in MacOS?

To cancel a specific print job using lprm in MacOS, you can specify the job ID associated with the print job. Use the following command:

Terminal window
lprm -P <printer_name> <job_id>

How do I remove all print jobs in the queue with lprm in MacOS?

To remove all print jobs in the queue using lprm in MacOS, you can use the command below:

Terminal window
lprm -a

How can I remove print jobs for a specific printer with lprm in MacOS?

To remove print jobs for a specific printer using lprm in MacOS, specify the printer name in the command. Use the following syntax:

Terminal window
lprm -P <printer_name>

Can I view the print jobs in the queue before removing them with lprm in MacOS?

Yes, you can view the print jobs in the queue before removing them using the lpq command. To list the print jobs in the queue, execute:

Terminal window
lpq

How do I remove a specific user’s print jobs using lprm in MacOS?

To remove print jobs of a specific user using lprm in MacOS, specify the username in the command. Use the following syntax:

Terminal window
lprm -U <username>

Is there a way to force remove print jobs without confirmation with lprm in MacOS?

Yes, you can force remove print jobs without confirmation using the - option with lprm in MacOS. Execute the following command:

Terminal window
lprm -P <printer_name> -

How do I remove a range of print job IDs with lprm in MacOS?

To remove a range of print job IDs using lprm in MacOS, specify the range in the command. Use the following syntax:

Terminal window
lprm -P <printer_name> <start_job_id>-<end_job_id>

Applications of the lprm command

  • Allows users to remove print jobs from the print queue on MacOS.