UI & OCC Report Installation Status Differently When Manually Removing an App Folder

If you remove a Nextcloud app by removing its application folder, it still shows as installed in the UI, however, occ does not report it as installed. Is there a command to resolve the discrepancy so the UI shows the app as being uninstalled as well?