BUG. snapcraft clean my-part -s build: "no such option: -s"


-s option does not work in of 3.5.1

Here is the help:
-s, --step [pull|build|stage|prime|strip]
only clean the specified step and those that
depend on it.
$ snapcraft clean my-part -s build
Error: no such option: -s

But --step works fine.
This issue broke all my scripts.


This option was removed in snapcraft 3.0 for whenever the base keyword is used. Auto-rebuild takes place or you can clean the entire part.


“snapcraft clean -h” still shows -s as a valid options


What version of snapcraft are you using?


Do I have an option to use particular version? It self updates every time through snapd without asking. And breaking current build scripts. Thanks to automatic updates that cannot be disabled.


It’s snapcraft 3.8 / Ubuntu 18.04 (updated from 16.04 a couple of days ago). “-s” is still all over the place, I remember seeing many snapcraft diagnostic messages stating something like “…you need to run snapcraft clean -s prime…”


Ok, this option is only available when not using a base in your snapcraft.yaml. Using the long option --step does work. I will add a fix for the short option now.

Thanks for the report.


Here’s the PR