Self-Hosting: deleting a file does not free up any disk space

What’s The Bug?

I delete a file within the client from the bin (more than 100MB).

The disk space does not get freed up.

One will run out of disk space at some point without the user being able to do anything about it.

# du -hs storage
1018M	storage (before uploading a file)
1,1G	storage (after uploading a file)
1,2G	storage (after deleting a file)

How To Reproduce It

  • check used disk space
  • upload a file
    • check used disk space and see that the usage increases
  • delete a file
    • check used disk space and see that the usage does not decrease

The Expected Behavior

disk usage decreases with files deletion

Device

MacBook pro

OS

Sonoma latest

Anytype Version

0.43.34-beta

Network Mode

Self-Hosted

Technical Information

OS version: darwin arm64 15.1.1
App version: 0.43.34-beta
Build number: build on 2024-12-11 19:46:40 +0000 UTC at #555d2665f9c65012234f54d09741be51b74b94a5 (dirty)
Library version: v0.38.4
Analytics ID: fe735bd2-0c3c-4ea0-bbba-1dbc0689649c

This report has been added to our issue tracker and received by the Development Team.

Is there any flag or setting I can set that it also deletes the minio objects on disk?

At the moment, we have not implemented the cleanup of deleted files.

Could you tell if this will get implemented at some point?
And if so (and regarding disk space concerns) will I be able to clean up disk space later on with future versions when I now already use the self hosted setup heavily (and therefore accumulating quite a lot of undeletable files)?

Yes, as soon as we implement it, old files which are no longer used by any space will be removed.
Our team is focused on other features right now, and unfortunately, this cleanup mechanism was already postponed several times. As soon as we have more understanding, I will post an update here.

Thank you very much for the detailed input.

Very much looking forward to this! Will make selfhosting much more affordable.

是因为历史版本的原因所以无法释放磁盘空间吗?
Can’t free disk space because of version history?

Is there a possibility to manually clean up minio?

Has there been any progress on improving cleanup? Do you have a timeline for when it might be implemented?

If you are interested in another application, Affine seems to do a fine job with cleaning up unused blobs (checked myself the free disk space before / after). It’s not Anytype, but perhaps something to consider if you are also interested in better and more seamless collaboration / editing.

WHAT IS THE BUG
The file node doesn’t delete files from S3 storage when you delete it within the app, so it just keeps geting bigger

HOW TO REPRODUCE IT

  1. Self host AnyType using whatever method (I used the ansible implementation, had to modify its janky af)

  2. upload file

  3. check s3 storage usage

  4. delete file

  5. delete permanently in bin

  6. check s3 storage usage again, bro i want my storage back

THE EXPECTED BEHAVIOR
If I delete the file, y’know, it’s actually deleted from storage

ADDITIONAL CONTEXT
I saw this mentioned a few times here and there in the GitHub repos, but didn’t see any proper bug reports

TECHNICAL INFORMATION
N/A
I used latest stable any-sync nodes on Github

Is there any update for this cleanup feature?

Would be great to have an update on this considering the new file-focused features