How to Completely Disable ‘CUPS’ (Print Server) Service in Ubuntu

By default, Ubuntu Desktop and even some Ubuntu Server installations ship with a background service called CUPS (Common UNIX Printing System). This daemon constantly runs in the background, listening on local network ports to manage print jobs, detect network printers via mDNS, and handle legacy printing protocols.

While CUPS is absolutely essential if you plan to plug a printer into your machine or print wirelessly, it represents entirely unnecessary overhead for a dedicated web server, a headless homelab, or a laptop user who has transitioned to a completely paperless workflow. Running services you do not use wastes RAM, consumes CPU cycles during boot, and expands your system’s attack surface by leaving open listening ports. If you never intend to print a physical piece of paper from your Ubuntu machine, you should completely disable the CUPS daemon.

Disabling the CUPS Service via Systemctl

Because CUPS is heavily integrated into the desktop environment’s system settings menus, you cannot simply uninstall the package (apt remove cups) without the package manager attempting to delete a massive web of dependencies, including the GNOME Control Center itself. The correct and safest way to kill the printing system is to mask the systemd services so they can never start.

  1. Open a new Terminal window (Ctrl + Alt + T on desktop, or simply connect via SSH).
  2. First, stop the currently running CUPS service and its associated network socket by typing the following command and pressing Enter (provide your password when prompted):
    sudo systemctl stop cups cups.socket cups-browsed
  3. Next, you must prevent the services from starting automatically upon the next reboot. Type the following command and press Enter:
    sudo systemctl disable cups cups.socket cups-browsed
  4. Finally, to completely lock down the system and ensure that no other service or desktop application can accidentally wake CUPS back up, you must “mask” it. Masking creates a symlink pointing to /dev/null, effectively tricking the system into thinking the service doesn’t exist. Run this command:
    sudo systemctl mask cups cups.socket cups-browsed
  5. You should see terminal output confirming that three symlinks were created pointing to /dev/null.

The change is instantaneous. Your system will immediately drop the listening ports associated with CUPS (typically port 631), freeing up memory and ensuring that no background resources will ever be wasted searching for network printers again.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.