Created
July 8, 2023 09:52
-
-
Save ayoayco/01069fdfba7cf81a732ffcd20d090ca8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Delete all cached headers | |
rm -rf /home/mastodon/live/public/system/cache/accounts/headers/* | |
# Prune remote accounts that never interacted with a local user | |
RAILS_ENV=production /home/mastodon/live/bin/tootctl accounts prune; | |
# Remove remote statuses that local users never interacted with older than n days | |
RAILS_ENV=production /home/mastodon/live/bin/tootctl statuses remove --days 7; | |
# Remove media attachments older than n days | |
RAILS_ENV=production /home/mastodon/live/bin/tootctl media remove --days 7; | |
# Remove all headers (including people I follow) | |
# RAILS_ENV=production /home/mastodon/live/bin/tootctl media remove --remove-headers --include-follows --days 0; | |
# Remove link previews older than n days | |
RAILS_ENV=production /home/mastodon/live/bin/tootctl preview_cards remove --days 7; | |
# Remove media orphaned | |
RAILS_ENV=production /home/mastodon/live/bin/tootctl media remove-orphans; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment