The Unnecessary Print Server Daemon
CUPS (Common UNIX Printing System) is the standards-based, open-source printing system developed by Apple for macOS and widely adopted across almost all Linux distributions, including Ubuntu. When you install Ubuntu Desktop, the cups daemon is automatically installed and enabled in the background so that if you plug in a USB printer, it will be instantly recognized and ready to use.
However, if you are configuring a headless Ubuntu Server in the cloud, a local network attached storage (NAS) device, or a strict web server, you will absolutely never connect a physical printer to it. Leaving the cups daemon running on a headless machine is a waste of system resources. It consumes memory, adds to boot times, and needlessly opens port 631 on your local interface. You should disable it entirely to harden and optimize your server.
How to Disable the CUPS Daemon
You can stop the printing service from running using systemctl.
Warning: Do not do this on a desktop PC if you ever plan to print a document. Disabling CUPS completely breaks the ability to print locally or over the network.
- Open your Ubuntu Terminal or connect via SSH.
- Stop the currently active service to immediately free up memory:
sudo systemctl stop cups.service
sudo systemctl stop cups.socket
sudo systemctl stop cups.path
- Disable the service so it does not initialize on the next system boot:
sudo systemctl disable cups.service
sudo systemctl disable cups.socket
sudo systemctl disable cups.path
Your server is now entirely devoid of printing capabilities. The background daemon is dead, and the associated local network ports are closed, resulting in a cleaner, leaner operating environment.