Cleaning ALL cache files

Where are cache files located and how can it be safely deleted?

The /live folder takes up over 15GB of space. That’s insane!

I would rather have local files cached so at this point want to clear out to reclaim space.

Anyone with tips on how to clear cache that may have items from remote instance?

Which folders is safe to delete?

I personally execute this daily with crontab :
@daily cd /home/mastodon/live && RAILS_ENV=production /home/mastodon/.rbenv/shims/bundle exec rails mastodon:media:remove_remot

It removes the local cached files of remote media older than one week. It’s a huge save of space.

1 Like

Will give it a try. Would you know how to set it to remove remote media older than one month instead of one week?

Just to make sure, do you have a typo?
mastodon:media:remove_remot

You would have to modify that line mastodon/mastodon.rake at 75c6513c678148e9a6adfcda57cfd5c8a16c804a · tootsuite/mastodon · GitHub

Sorry it’s mastodon:media:remove_remote indeed.

1 Like

It was helpful in freeing up GB of space. Thanks for sharing!

1 Like