How to Completely Disable the ‘Bluetooth’ Daemon (BlueZ) in Ubuntu Server

Modern Linux distributions, including Ubuntu Server, ship with incredibly broad hardware support out of the box. Part of this default configuration is the BlueZ protocol stack, which runs a background daemon (bluetoothd) that constantly polls your system’s hardware buses for Bluetooth adapters. If it finds one (which is common, as many modern server motherboards include integrated Wi-Fi/Bluetooth chips), it activates the radio and begins scanning the local environment for discoverable devices.

For a headless server sitting in a rack or a closet, this is a terrible default configuration. An active Bluetooth radio is a massive, unnecessary attack vector. It broadcasts the server’s presence to anyone physically nearby and opens the system up to Bluejacking, Blueborne exploits, and unauthorized pairing attempts. Furthermore, the daemon consumes a small amount of CPU and RAM while doing absolutely nothing useful. To properly harden your Ubuntu Server, you must completely disable the Bluetooth daemon.

Stopping and Disabling the Bluetooth Service via Systemctl

Because BlueZ is managed by the systemd init system, you can easily stop the daemon from running and permanently disable its startup trigger.

  1. Open a Terminal session (or connect to your server via SSH).
  2. First, stop the daemon if it is currently running in the background:
    sudo systemctl stop bluetooth.service
  3. Next, permanently disable the service so that it does not automatically launch the next time you reboot the server:
    sudo systemctl disable bluetooth.service

Uninstalling the BlueZ Stack Entirely (Recommended)

Simply disabling the service leaves the binary files on your hard drive. If another software package (like a desktop environment or an audio server) lists Bluetooth as a dependency, an APT upgrade could silently re-enable the daemon in the background. The absolute safest way to harden your server is to purge the software completely.

  1. In the terminal, run the following command to completely uninstall the BlueZ package and delete its configuration files:
    sudo apt-get purge bluez
  2. Press Y when prompted to confirm the removal.
  3. Clean up any orphaned networking dependencies left behind (such as bluez-obexd):
    sudo apt-get autoremove

With the software entirely purged from your system, your Ubuntu Server is now completely incapable of initializing a Bluetooth radio, even if one is physically soldered to the motherboard. Your system attack surface is reduced, and background RAM usage is slightly optimized.

Get the best tech tips delivered straight to your inbox.

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