How to Completely Disable ‘LXD’ (Linux Containers Daemon) in Ubuntu Server

LXD is a next-generation system container and virtual machine manager developed by Canonical. In modern Ubuntu Server deployments, the LXD daemon often comes pre-installed (typically via snap) to facilitate lightweight, system-level virtualization that operates closer to bare metal than traditional hypervisors or Docker application containers. However, if your server is strictly dedicated to running bare-metal applications, operates solely as a Docker host, or acts as a singular database node, the LXD daemon is unnecessary overhead. Leaving it running consumes RAM, maintains open network sockets, and adds complexity to your system’s attack surface.

This guide explains how to completely disable, stop, and purge the LXD daemon from your Ubuntu Server to reclaim system resources and maintain a minimal, hardened environment.

Stop and Disable the LXD Snap Daemon

Because Canonical heavily pushes the snap ecosystem, LXD is almost exclusively deployed as a snap package on modern Ubuntu releases (20.04 LTS and later) rather than a traditional APT package. Therefore, you must manage it using the snap utility.

  1. Log into your Ubuntu server via SSH and open a terminal.
  2. First, check the current status of the LXD snap to confirm it is running:
    sudo snap list | grep lxd
  3. If LXD is present, halt the running daemon immediately:
    sudo snap stop lxd
  4. To prevent the daemon from starting automatically on the next system boot, disable it:
    sudo snap disable lxd

At this stage, the LXD binaries remain on the disk, but the daemon is inactive. This is useful if you plan to utilize system containers in the future but want the service turned off temporarily.

Completely Purge LXD from the System

If you are certain that you will never use LXD on this specific server architecture, you should completely remove the package to reclaim disk space and ensure no leftover network bridges (like lxdbr0) interfere with your custom routing.

  1. Execute the snap remove command to completely uninstall LXD and delete its associated data:
    sudo snap remove lxd
    Note: This process may take a few moments as snap unmounts the squashfs volumes and purges the local container storage pools.
  2. (Optional) If you are absolutely certain you will not use any snap packages on your server (a common preference for minimalists who prefer APT), you can take it a step further and purge the entire snap daemon (snapd):
    sudo apt-get purge snapd
    sudo apt-get autoremove

Your Ubuntu Server is now completely free of LXD container management overhead, resulting in a cleaner network stack and a leaner operating system footprint.

Get the best tech tips delivered straight to your inbox.

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