Question

I have a macOS 10.13 machine that is being used only for remote work, and has no need for printers. Printer Sharing is definitely turned off in System Preferences, and yet, cupsd is listening to a port:

# lsof -i :631
COMMAND PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
cupsd   427 root    5u  IPv6 0xbb661a1308e1d70b      0t0  TCP localhost:ipp (LISTEN)
cupsd   427 root    6u  IPv4 0xbb661a130bee2d13      0t0  TCP localhost:ipp (LISTEN)

What is the appropriate way to turn off cupsd?

Was it helpful?

Solution

In the terminal...

sudo launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist

...will unload cups. This stops the service.

After that,

sudo launchctl remove /System/Library/LaunchDaemons/org.cups.cupsd.plist

...will ensure that cups does not come back after a reboot.

I don't know how OS X will react if you try to leave cups unloaded in the long term. Also, I am nearly certain that major (and likely some minor) OS updates will "correct the issue" and reload cups for you. So helpful.

Last, you can check to see what services are currently running by using sudo launchctl list

OTHER TIPS

The correct command, especially with macOS Catalina, to permanently disable cups is:

sudo launchctl unload -w /System/Library/LaunchDaemons/org.cups.cupsd.plist

(The currently accepted answer states launchctl remove /System/Library/LaunchDaemons/org.cups.cupsd.plist but in fact that doesn't do anything other than fail silently with an error return code)

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top