Mastodon media cache cleanup is doing nothing?
-
I am running Mastodon on my Cloudron.
Since the media cache tends to use up much space quickly I looked up a way to delete it from time to time.Fortunately there is already a cleanup script available in the mastodon terminal.
/app/pkg/cleanup.sh
Thanks for that.
I tried the script as well as the pure command which is
./bin/tootctl media remove
The outcome is this:
Removed 0 media attachments (approx. 0 Bytes)
I restarted the application, rechecked. The disk usage remained the same.
Using the following command I checked, how things look from the tooctl´s perspective in contrast to the Cloudron volumes inspector.
.bin/tooctl media usage
Result:
Attachments: 3.01 GB (3.54 MB local) Custom emoji: 4.98 MB (0 Bytes local) Preview cards: 63 MB Avatars: 101 MB (116 KB local) Headers: 297 MB (195 KB local) Backups: 0 Bytes Imports: 0 Bytes Settings: 204 KB
As you can see the Attachments take up 3.01 GB and I can´t delete them. What is the problem? I do not understand. I suppose it is something specific to the Cloudron installation?
-
Solution:
./bin/tootctl media remove
has an option
--days
which defaults to 7 days of not set.
Our instance is only 3 days old. Since i did not set the flag it defaulted to 7 days.
The system did everything right. There were no files as old or older than 7 days. Accordingly it did not delete anything. Computer smart.I was able to delete the cached media files.
-
@whitespace Is there a default aging limit to what it will remove?
-
@whitespace said in Mastodon media cache cleanup is doing nothing?:
3.01 GB (3.54 MB local)
I know nothing about this, but perhaps the issue is that only 3.54 MB are local?
Just a random guess, but I'd guess perhaps you're not actually able to delete attachments posted by non-local accounts?
-
@jdaviescoates I had this thought. I consulted other Mastodon admins. They say, they can delete everything. This should not occur.
-
Solution:
./bin/tootctl media remove
has an option
--days
which defaults to 7 days of not set.
Our instance is only 3 days old. Since i did not set the flag it defaulted to 7 days.
The system did everything right. There were no files as old or older than 7 days. Accordingly it did not delete anything. Computer smart.I was able to delete the cached media files.
-
-