As it is currently, the storage space on server can quickly fill up if cached images are not cleaned regularly.
I've tried to find if lemmy runs any kind of schedule for this, but doesn't seem like it from the code:
https://github.com/LemmyNet/lemmy/blob/main/src/scheduled_tasks.rs

you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 3 years ago (1 child)

I have about 20GB of cached images on my instance… Wish there was an easy way to delete it.

  • source
  • hideshow 2 child comments
  • [–] [S] 4 points 3 years ago*

    Yeah. I guess we could fetch all image ids from the database excluding those uploaded to our local instance, and loop them through the DELETE /image/delete/{delete_token}/{file} API. But I've no idea how to get the delete_token, seems like it's available only during image upload.

  • source
  • parent