OCC files:cleanup - Does it delete the db table entries of the missing files?

Sorry that I have to say that, but the accepted answer is simply wrong.
The command does exactly what it says: It checks the oc_storage table and removes all entries from oc_filecache that have no valid storage assigned.
Checking with most recent version (18.0.3) of NextCloud, we had plenty of non-existing local storage entries that were still marked active. (We migrated our instance from an external web server to a Synology NAS, then later to the nextcloud-fpm docker environment.)
Only after removing those, the cleanup command started to do anything. It appears that the file system is not checked at all when running the cleanup command. We still have tons of outdated items in the oc_filecache table, this seems to be accepted by devs.

2 Likes