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.shThanks for that.
I tried the script as well as the pure command which is
./bin/tootctl media removeThe 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 usageResult:
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 removehas an option
--dayswhich 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.
-
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.shThanks for that.
I tried the script as well as the pure command which is
./bin/tootctl media removeThe 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 usageResult:
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?
@whitespace Is there a default aging limit to what it will remove?
-
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.shThanks for that.
I tried the script as well as the pure command which is
./bin/tootctl media removeThe 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 usageResult:
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?
@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?

-
@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 removehas an option
--dayswhich 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.
-
G girish marked this topic as a question on
-
G girish has marked this topic as solved on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login