There was some discussion of adding revert hooks many years ago, but these were not added: Install/remove hooks
I started to poke around at the snapd source code, but I figured it would be good to get this answered publicly and documented, so I’m opening this thread here.
I talked to the snapd team, and it seems snap revert does not cause pre/post-refresh hooks to run. As mentioned, there was previous discussion around adding hooks specifically for reverts, but that has not yet been planned. So snaps need to do their own coordination around detecting/handling reverts, if relevant.
Hi @oac! Thanks for doing this research and for making those recommendations. We’ve now brought the Supported snap hooks page back over to the snapd side of the documentation. I’ve updated the pre- and post- refresh hooks as you suggested, and will create a task to add the missing hooks. Thank you!