I am building a product based on Ubuntu Core 18. I have couple of application snaps and my own gadget snap integrated to our own brandstore. I would like to factory reset all the snaps.
- Is there a standard procedure for the same?
- By factory reset I would like to clear the /var/snaps/… folders of the application snaps. Are there other persistent data to be cleared e.g logs or
A standard function for this is on the roadmap for the Ubuntu Core 20 release, today there is no such standard procedure …
you could create an extra partition in your gadget and back up the content of /var/lib/snapd and the original seed.yaml file on first boot somehow from a hacked up initrd script though (it needs to happen before snapd starts the seeding process) … but that is indeed non-trivial development work