Nextcloud repair steps: Is there a way to distinguish between app deactivation and deinstallation?


According to the Nextcloud developer manual ( repair steps that are registered as type “uninstall” will be run on both app deactivation and app deinstallation.

Is there a way to explicitly identify if a deactivation (i. e. assuming an app will be re-activated at a later date) or a deinstallation is taking place when the repair step is run?

Thank you very much!
With best regards,

1 Like

From an API perspective it looks like this distinction is not possible right now.

Would a patch adding this distinction useful for other third-party apps, or is this an isolated use case?

I’ve wondered about this myself before. Especially, since the lack of an actual uninstall hook leaves unnecessary database tables floating around from all apps you ever installed. I’d like to offer a clean uninstall, but I don’t want people to lose data when deactivating an app.