This is an occ command to cleanup orphaned remote storages.
To explain why this is necessary, a little background is required.
While shares are able to be deleted as a normal matter of course, remote storages with
shared:: are not included in this process.
This might not, normally, be a problem.
However, if a user has re-shared a remote share which has been deleted it will.
This is because when the original share is deleted, the remote re-share reference is not.
fileid will remain in the file cache and storage for that file will not be deleted.
As a result, any user(s) who the share was re-shared with will now get an error when trying to access that file or folder. That’s why the command is available. So, to cleanup all orphaned remote storages, run it as follows:
sudo -u www-data php occ sharing:cleanup-remote-storages
You can also set it up to run as a background job.
|These commands are not available in single-user (maintenance) mode.|
system system:cron Execute background jobs as cron
sudo -u www-data php occ -h system:cron -Usage: system:cron [options]
Shows a progress bar - for use in manual execution. Do not use when executing from crontab
sudo -u www-data php occ system:cron
-p argument is specified, then progress output will be displayed in the console, as in the example below.
Executing: 12 - OCA\UpdateNotification\Notification\BackgroundJob 13 [------------->--------------]
If neither of these arguments is provided, no output will be displayed by the command.
|Displaying progress information is useful when you want visual confirmation that background jobs have been executed. However, in a non-interactive environment, such as crontab, it should not be used.|
If you have already automated background jobs via Cron, you must update the relevant
This command does not work if: