Lemmy self-hosters. What is your image cleanup process?
I'm self-hosting the docker containers and I noticed the pictrs directory is steadily growing because of the cached images. Does anyone know if it gets cleaned up automatically or are hosters running scripts to clean it up after a certain amount of time? The install guides make no mention of it from what I can find.
You are viewing a single comment
I believe the activity table in Postgres is retained for 6 months (although I’m purging mine daily) and the pict-rs cache is 168 hours (1 week).
I knew I read something was kept for 6 months ;)
Glad to see that even here, the best way to get the right answer on the internet is to provide a wrong one.
Only 1 week? That should be fine. Thanks!
I was starting to sweat a little because my instance, that only I use, already has 600MB of pictures after less than 24 hours. The server has more than enough space, but I still wouldn't like it. A week is far more swallow-able.
How do you purge daily? Also, does that delete any post history or anything in a similar vein?
I’m running the following SQL, although I’m not actually sure it’s as necessary since 0.18.3. It doesn’t delete any post history or anything.