Mac Commands Tab Policy: Add or Delete a Printer

Using the Commands feature, many administrative users will deploy scripts and commands to further their ability for systems management using JumpCloud. In working with a varied audience of users and environments, we have collaborated to create some "Policy" commands for purposes ranging from security to software management. Learn more about commands in Get Started: Commands.


The commands listed in this article are specific to adding a new printer, or deleting an existing printer on a Mac system.



Most commands will require root or sudo access for proper execution.

You need the following considerations when choosing the user to "Run as" for the command:

  • Run as root
  • Run as a user who has passwordless sudo access.  Note that interactive commands will not work since we are executing a remote execution, thus why passwordless sudo is specified

Add a Printer

The following command will allow for adding a new printer onto a Mac system.  To add a new printer to the system, you will need to supply:

  • The printer name
  • The IP or DNS address
  • A path to the printer PPD file
  • A description for the printer

/usr/sbin/lpadmin -p "name of printer" -E -v lpd://"printer IP or DNS"/"queue name" -P "path to PPD file" -D "description"

Example Command:

/usr/sbin/lpadmin -p "Brother" -E -v lpd:// -P /Users/rbalboa/Desktop/brother.ppd -D "Brother Color Printer"

Delete a Printer

The following commands will allow for deleting an existing printer on a Mac system.  To delete the printer, you will need to supply:

  • The printer name

/usr/sbin/lpadmin -x "name of printer"

List IconIn this Article

Still Have Questions?

If you cannot find an answer to your question in our FAQ, you can always contact us.

Submit a Case