⚠️ This is an old post.

Content may be out of date.

You can disable macOS printer sharing for all printers using the lpstat and lpadmin tools:

lpstat -p | grep printer | awk '{print $2}'| xargs -I{} lpadmin -p {} -o printer-is-shared=false

Gist on GitHub