Occ trashbin;clean fails

This command sudo -u www-data php occ trashbin:cleanup fails with this message:

[Symfony\Component\Console\Exception\CommandNotFoundException]
There are no commands defined in the “trashbin” namespace.

Nextcloud version 15.0.0_
Operating system and version raspbian 9.6:
Apache or nginx version Apache 2.4.25
:
PHP version 7.0.33

Is this the first time you’ve seen this error? Y but it is my first try

Steps to replicate it:

run this command:

sudo -u www-data php occ Trashbin:cleanup

Please note that most of the things in Linux are case sensitive:
https://docs.nextcloud.com/server/15/admin_manual/configuration_server/occ_command.html#trashbin

Yes, you’re right I did a mistake in the post ( In fact, i’ve tried without and with the uppercase and the result is the same.).

The deleted app is enabled? No errors for the integrity check (on admin page)?

The occ list command shows the trashbin options?

Yes, deleted app is enabled and no, occ list doesn’t show any trashbin function.

I didn’t find integrity check in admin page so I did; sudo -u www-data php occ integrity:check-app

result:

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade

  • EXCEPTION:
    • class: Exception
    • message: App not found

I did:

sudo -u www-data php occ upgrade

result:

Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Set log level to debug
Updating database schema
Updated database
Updating …
Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing ‘SELECT class FROM oc_admin_settings WHERE class = ? LIMIT 1’ with params [“OCA\Federat edFileSharing\Settings\Admin”]:

SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘owncloud.oc_admin_settings’ doesn’t exist
Update failed
Maintenance mode is kept active
Reset log level

Thanks for your help.

Can you give a bit more background of your setup. Is this a new installation or did you run upgrades? Did it work before? Migration from ownCloud?

I ran several upgrades,
As far as I remember, Migration from owncloud was not successfull, so I did a brand new nextCloud installation, and it was around v13. Then I re-uploaded all data. Since I did some upgrades to v14 and v15.

Sorry to be not very accurate but it is what I remember.