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).
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.