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

**URL:** <https://help.nextcloud.com/t/nextcloud-repair-steps-is-there-a-way-to-distinguish-between-app-deactivation-and-deinstallation/128758>\
**Category:** 💻 Development\
**Created:** [December 7, 2021, 11:42am UTC](https://help.nextcloud.com/t/nextcloud-repair-steps-is-there-a-way-to-distinguish-between-app-deactivation-and-deinstallation/128758 "2021-12-07T11:42:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![faichele](https://help.nextcloud.com/letter_avatar/faichele/32/5_5575768a8748004e209b776fc1b2916d.png) [@faichele](https://help.nextcloud.com/u/faichele)\
**Post date:** [December 7, 2021, 11:42am UTC](https://help.nextcloud.com/t/nextcloud-repair-steps-is-there-a-way-to-distinguish-between-app-deactivation-and-deinstallation/128758/1 "2021-12-07T11:42:48Z")

</div>

Hello!

According to the Nextcloud developer manual ([https://docs.nextcloud.com/server/23/developer\_manual/digging\_deeper/repair.html#repair-step-types](https://docs.nextcloud.com/server/23/developer_manual/digging_deeper/repair.html#repair-step-types)) 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,  
Fabian

---

<div class="post-metadata">

**Author:** ![ChristophWurst](https://help.nextcloud.com/user_avatar/help.nextcloud.com/christophwurst/32/51805_2.png) [@ChristophWurst](https://help.nextcloud.com/u/ChristophWurst)\
**Post date:** [December 9, 2021, 1:50pm UTC](https://help.nextcloud.com/t/nextcloud-repair-steps-is-there-a-way-to-distinguish-between-app-deactivation-and-deinstallation/128758/2 "2021-12-09T13:50:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![faichele](https://help.nextcloud.com/letter_avatar/faichele/32/5_5575768a8748004e209b776fc1b2916d.png) [@faichele](https://help.nextcloud.com/u/faichele)\
**Post date:** [March 3, 2022, 6:02pm UTC](https://help.nextcloud.com/t/nextcloud-repair-steps-is-there-a-way-to-distinguish-between-app-deactivation-and-deinstallation/128758/3 "2022-03-03T18:02:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![marcelklehr](https://help.nextcloud.com/user_avatar/help.nextcloud.com/marcelklehr/32/25296_2.png) [@marcelklehr](https://help.nextcloud.com/u/marcelklehr)\
**Post date:** [March 3, 2022, 6:28pm UTC](https://help.nextcloud.com/t/nextcloud-repair-steps-is-there-a-way-to-distinguish-between-app-deactivation-and-deinstallation/128758/4 "2022-03-03T18:28:31Z")

</div>

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.
