When you remove an app using the button on the Apps page this deletes all the app’s files but it does not delete the apps config settings.
The occ command config:app:delete apname settingname only deletes a single setting, there doesn’t seem to be a way to delete all of an app’s settings from the system.
If an app breaks as a result of a corrupt setting this means that a simple [remove] followed by a reinstall does not solve the issue. You have to find the particular setting that is causing the problem and remove it before you can reinstall.
Since when an app is installed it sets up its default settings it seems a bit daft not to simply remove the settings when the app is uninstalled.
In the particular case that caused the problem the app itself (OnlyOffice) wrote a setting saying there was an error - this didn’t get reset by reinstalling the app and prevented the app from doing anything - you could argue that that is the app developer’s problem, but there doesn’t seem any good reason for nextcloud to leave redundant settings lying around after it removes an app - Remove is not really Removing the app, it it?
Maybe this should be posted in bugs or features - if that is more appropriate perhaps a moderator could move this topic there…
@Michael_Gentles the way I had to fix OnlyOffice was to install the occ-web app (I don’t have ssh access to the server where the issue arose), and having removed both the onlyoffice connector and the document server from apps, run occ commands config:list onlyoffice to get a list of all of the settings, and then for each setting run the command config:app:delete onlyoffice settingname, and then do the same for documentserver_community.
Then I could reinstall (having removed the issue that caused the problem in the first place) and all was ok.
It can’t be that difficult to tag those commands onto the end of the remove app function wherever that is in the code. I wouldn’t have the first idea where to look.
In a related issue it would be a good feature if there was an occ command to delete all of an apps settings rather than having to type in each one individually.
Yep, that’s almost exactly what I ended up doing just a few hours ago. The only setting I had to delete in my case was settings_error. I really wish I had fully read your initial post, I ended up finding that on my own, after pouring through the documentation. I threw my somewhat flip comment on here in frustration. I agree, it would be great if there was a way delete all of the settings. It would also be great if that settings_error wasn’t persistent even after removing the app.