I have found removed servers in attribute univentionAppInstalledOnServer in a customer environment. From my point of view we should clean these attribute if we remove a server via UMC or udm. O have seen that on a 4.4 system but I'm sure this behavior is unchanged in UCS5. I'm not sure if the component is correct. The procedure "remove a server" should be extended to remove all entries of that server in attributes univentionAppInstalledOnServer. No big problem but noticeable. Reproduce install f.e. samba4 on a server and remove that server via UMC. You will still find the server in the samba4 object in ldap in the attribute univentionAppInstalledOnServer
I found the same issue at another customer. After removing a server and rejoining the Appcenter was effectively broken for that server, because of this issue. Since the LDAP data was still there for the APP it was still shown as installed and could not be installed. Since the container was not there it could not be upgraded or removed. Removing the entry from the LDAP solved the issue. However UDM is there to prevent such things from happening and without help the customer would not have been able to fix it.
Fixed in univention-directory-manager-modules (17.2.13)
<https://errata.software-univention.de/#/?erratum=5.2x173>