Delete temp files?

Hello, My temp directory has about 500 files inside it totaling almost 2GB. It looks like all these files were made last year. Can I delete them?

Dont delete anything

They are really too old. Keep the last mounts and delete the rest.

ls -l storage/temp
total 4532
-rw------- 1 root root 2317568 Jan 12 19:12 blob-058916465.partial
-rw------- 1 root root 4194304 Jan 14 18:33 blob-190380016.partial
-rw------- 1 root root 3840 Jan 14 18:33 blob-867503759.partial
-rw------- 1 root root 2317568 Jan 12 18:57 blob-937654086.partial

Why doesn’t it clean up after itself?

I have hundreds of files in my “temp” folder that haven’t had any activity in days. Will those be removed automatically eventually?

I’ve got a dozen in there, 2-3 weeks old. I think they are leftovers from 2 power failures.

Delete them?

No, remove only old ones (older than a month)

2 Likes

I think a month is a bit long considering that these files are written during the upload process.

New uploaded pieces are written into the temp folder and then moved into the blob folder structure when the upload is accepted. If the upload is canceled, they are deleted.

Unless we’re expecting piece uploads to be taking multiple days (surely the upload will have abandoned the upload well before that point!?) then it should be safe to delete anything more than a few hours old.

Or, you can do what I did: stop your node, delete everything in temp, then restart your node. (It’s impossible for there to be any in-progress uploads while the node is not running.)

I think this process should be automated in general.

Vacuuming DBs, emptying temp dirs of old folders, making sure all files that are present are paid (i.e. cleanup after GE).

4 Likes