Refresh snap from local .snap file

Hi together

I’m trying to debug some hooks and made a local snapcraft test project. Then build it locally and installed it from the .snap file with --devmode.

I have a pre-refresh hook in the snap, but this hook does not get fired becuase I cannot refresh the snap from a local file.

The post from mvo here:


Implies that there is a possibility but I can’t find it and --from-local seems to not exist and in the --help from snap refresh I cant find something related.

I could upload it to the store, build it again, get the new revision and download it. But its only a testsnap so that would be kind of naughty.

Thanks for your help!

Greetings Alex

You can’t run snap refresh on a local file, but you can run snap install on a local file which effectively acts as a refresh and runs the hooks you want to test

2 Likes