Installing LXD on Ubuntu 18.04 (The Right Way)

Ubuntu 18.04 comes with LXD installed as a DEB package, however the recommended way to install it is via snap.

Note: If you do a netboot installation LXD is not installed

On a fresh installation without LXD configured:

sudo apt remove --purge lxd lxd-client liblxc1 lxcfs

Then install LXD via snap

sudo snap install lxd

On a existing system with LXD configured/containers running:

install LXD via snap

 sudo snap install lxd

Then migrate to the snap install of LXD

sudo lxd.migrate