--use-lxd clean part-name

When I run snapcraft --use-lxd, it works perfect. But if I want to clean a part (or even the entire container), I get an error:

snapcraft --use-lxd clean part-name
Usage: snapcraft clean [OPTIONS] <part>...

Error: --use-lxd cannot be used with build provider 'multipass'

It’s not a big deal, because I found a work around:

SNAPCRAFT_BUILD_ENVIRONMENT=lxd snapcraft --use-lxd clean part-name

This feels like a bug. But maybe I’m doing something wrong here?

Hi @ryanjyoder, clean needs to be the first argument, it’s a bug in the snapcraft CLI that it cares about option order…

3 Likes