How to manage deleted files in Nextcloud?

When we delete a file in Nextcloud, it is not immediately deleted permanently but is moved to the garbage container. It would only be eliminated permanently if we do it ourselves or if the Deleted files application deletes it to make room for new files.

We can find them in the section of Deleted files to restore them or delete them permanently.

Quotas:

The deleted files are not counted in our storage quota nor shared. Only our personal files count. (See the manual How to configure the storage quota in Nextcloud? for more information).

What happens when shared files are deleted?:

To understand how the elimination of shared files works, we will present the following situation:

  1. A User1 shares the ”test” folder with User2 and User3.
  2. User2 deletes a file or a folder within the shared folder ”test”.
  3. This folder or file will be moved to the Trash of User1 and User3.
  4. On the other hand, User3 will not receive a copy of this file or folder in its trash.

If User1 deletes a file or folder, it will be moved to its trash. But it will be deleted from User2 and User3 without it being moved to their respective bins.

When we share files, other users can move them, copy them, rename them and share them with other people.

How does the storage space manage the application of deleted files?:

To ensure that users do not exceed their storage quotas, the Deleted Files application assigns a maximum of 50% of their free space available at that time to the deleted files. If the deleted files exceed this limit, Nextcloud will delete the oldest files until it complies with the memory usage limit again.

Nextcloud checks the time of the deleted files each time new files are added to the deleted files. By default, the deleted files remain in the trash for 30 days. The Nextcloud server administrator can adjust this value in the config.php file by setting the value of trashbin_retention_obligation. Files older than the value of trashbin_retention_obligation will be permanently deleted. In addition, Nextcloud calculates the maximum space available each time a new file is added. If the deleted files exceed the new maximum allowed space, Nextcloud will expire the old deleted files until the limit is met once more.

Leave a Comment