How do you disable Printer Sharing via terminal?

I am looking for a command/script to disable the printing sharing feature via terminal. Does anyone have any idea or know how to go about doing this?


Solution 1:

Use lpstat -v to get the appropriate printer name, then use:

lpadmin -p Printer_Name -o printer-is-shared=false

Solution 2:

According to cupsctl's man page:

cupsctl --no-share-printers