Snap LXD has blocked me up

I’ve got a juju manual cloud unit that runs some LXD containers, it also runs some manually provisioned LXD containers.

It runs them via the snap and has done just fine for a few months.

At some point recently LXD has started reporting

Error: Both native and snap packages are installed on this system
       Run "lxd.migrate" to complete your migration to the snap package

The problem is juju or something seems to keep reinstalling the deb version. So I run lxd.migrate and tell it not to remove the old stack, this message keeps popping up, even though I have no contaners running in it. If I remove the old LXC, the migrate process seems to brick my lxdbr0 and nothing works there.

A reboot fixes the lxdbr0 but I can’t login to any of my containers so some services don’t start yet I don’t have access to them… so for example my websites are currently mostly offline… sad times.

Can I trick it out somehow to make it think LXC/LXD debs aren’t installed?

Ideally, you should get only one of the two packages (either deb or snap) to be installed on the server.
If you use the snap package, then you should remove the deb package.

Perhaps there is a juju charm that does not know about the snap package of LXD, and tries to install the deb package anyway?

You can block the deb package from installing by using the commands in

If you cannot rebuild the server, and you have to have both deb and snap packages installed, you can try to get the deb lxc client command to work on the snap LXD service. You would need to do something like

/usr/bin/lxc remote add ... and add the details of the snap LXD. With lxc remote list you can view the necessary details. This might or might not work, so please report back in either case.

Thanks I can have a go.

Doesn’t the fact the migrate script make the removal of LXC deb package optional indicate that whilst its preferable to have everything in snap land, in reality they can coexist?

To me it feels like the migrate script is a little overzealous in however it detects an older LXC stack.

Okay sticking LXD and LXD into the apt dungeon seems to have done enough, thanks!