How to clear files_trashbin in OwnCloud

Any file that deleted by user is not immediately removed from ownCloud server, but goes into the Trashbin. Then the user has the options to un-delete the file, or to delete it permanently.

The administrator can empty the files_trashbin in a single command if required.

Step1: Login to the owncloud server via ssh as root.

Step2: Change the location to the folder where owncloud hosted.

#cd /var/www/owncloud

Note that the folder path may change according to the environment.

Step3: Run the following command and it removes all the deleted files of all users.

#sudo -u www-data php occ trashbin:cleanup

Where 'www-data' is the user which owns the apache process and this may change according to the environment.

If need to specify the usernames., this command have that option.

#sudo -u www-data php occ trashbin:cleanup user1 user2

That's all….