I have a directory /var/www/nextcloud/user/uploads/2260247444/ with 1678 files in it from 00000000 to 00001678 all with a size of 9.6MB
I never seen this kind of directory before. Looks like a buffer directory for large upload files. Is that correct? The files in there are over 2 days old. Can these files be deleted without any issues? It’s about 16GB.
The uploads folder directly gets filled when the client is uploading files. When the upload finishes this folder gets cleaned out automatically. If one is absolutely certain that no clients for a particular users are uploading files then it is okay to delete the contents of the uploads folder.
Is there any way to clean this up automatically?
I use external storage as a only place to store files and my server has very limited file system capacity. A few big uploads with errors and it is full…
Assuming using Debian or a Debian derivative and depending on where uploads folder is located (think it is located in Nextcloud data folder) one could run the following command via cron as www-data as often as wanted.
How long should it take after the end of the upload to get cleaned out? Around 20 minutes after stopping a sync I can still see the files in the uploads directory.
EDIT: I checked 1 day later and it was removed. Maybe triggered by the sync app after successfully uploading the files?