infrastructure/ansible/roles/mastodon/files/purge-media.sh
Jake Howard 56b846f38c
All checks were successful
/ terraform (push) Successful in 40s
/ ansible (push) Successful in 1m49s
Prune mastodon accounts and orphan media
2023-07-04 21:19:35 +01:00

12 lines
395 B
Bash

#!/usr/bin/env bash
set -ex
cd /opt/mastodon
docker-compose exec mastodon tootctl accounts prune
docker-compose exec mastodon tootctl media remove --days=7
docker-compose exec mastodon tootctl statuses remove --days=7
docker-compose exec mastodon tootctl preview_cards remove --days=7
docker-compose exec mastodon tootctl media remove-orphans
docker-compose exec mastodon tootctl cache clear