Delete snapshots without lxd-client package

Hi guys,

I use an lxc container for running my owncloud that has migrated from Ubuntu 16.04 (and its associated lxc version) to 18.04 and now 20.04 without any issue.
I’ve experimented with snapshots a bit and when I wanted to delete one of the snapshots, I noticed that I’m only able to issue lxc-* commands, while lxc delete <container>/<snapshot_name>, for example returns “command not found” and there is no lxc-delete.
I started digging and found this issue where Stéphane explains that you need to install “lxd-client”, however this would only show containers managed by an LXD daemon.

As far as I understand it, installing this package would not solve my problem, because the container in question would still not be managed by an LXD daemon. Is that assumption correct?

  • Is there a way to delete a snapshot without relying on lxd-client (I didn’t dare to play around with lxc-destroy)?

  • Would you, in general, recommend to migrate the containers to LXD daemon management?

Thanks and kind regards


LXC and LXD are different, and here is a post on the differences,

The lxc-utils package is for LXC, and provides those lxc-snapshot client commands.

With LXD, if you have the DEB package then the client commands come from the lxd-client package.
However, if you are using the LXD snap package, then the LXD client commands are already included in the installed snap package.

It looks like you do have LXC, therefore to migrate to using LXD, you would need to use the lxc-to-lxd utility, as described here,

Note that you would need to decide which LXD package to install, and probably which version. With the deb package of LXD, you can use this on a Ubuntu 18.04 host. Newer versions of Ubuntu have only the snap package of LXD. Within the snap package of LXD, you can select either to follow the latest stable version (currently at version 4.10) or LXD 4.0.x (or even LXD 3.0 or LXD 2.0). You can see all these by running snap info lxd. You would either select LXD 4.0.x or the latest stable version. Note that you can upgrade versions but not downgrade (without hassle).

Thanks a lot!
I don’t quite know how I could have missed that but lxc-utils was the key.
All snapshots except the very first one have been deleted and the container is still fine :slight_smile:

When I want to delete that last snapshot, all I get is:
failed to load config for snap <nameofsnap>

The debug option shows
Unknown configuration key "lxc.utsname"

This is indeed an old config key as this -probably- a pre 3.0 Snapshot.
How do I delete such an outdated snapshot? Manually fixing the keys?

If this is supposed to go into a separate post, let me know.


I think it is good to put this in a new post. I do not know the answer and will likely after other that perform such a migration.