Overview
General commands for cleaning up resources on Mastodon servers
Setup
Stop services
sudo systemctl stop mastodon-sidekiq mastodon-streaming mastodon-webRestart postgresql
sudo systemctl restart postgresqlLog into mastodon user
sudo su - mastodonGo to
livedirectorycd /home/mastodon/live
Check media usage
RAILS_ENV=production ./bin/tootctl media usage
Remove media
RAILS_ENV=production ./bin/tootctl media remove
Remove media headers
RAILS_ENV=production ./bin/tootctl media remove --prune-profiles
Remove preview cards
RAILS_ENV=production ./bin/tootctl preview_cards remove
Restart services
sudo systemctl restart mastodon-sidekiq mastodon-streaming mastodon-web