Skip to content
Mountain/\Ash edited this page Dec 8, 2024 · 1 revision

Disk Space issues

  1. flyctl machines list note the ID to your running machine, you need to connect to it as the Volume is mounted to it

  2. flyctl console --machine ${MACHINE_ID}

  3. df -h Check remaining disk space before cleanup

  4. Run the following commands from the script below to clean up some caches

    #!/bin/bash
    
    RAILS_ENV=production /opt/mastodon/bin/tootctl accounts prune
    RAILS_ENV=production /opt/mastodon/bin/tootctl statuses remove --days 2
    RAILS_ENV=production /opt/mastodon/bin/tootctl media remove --days 2
    RAILS_ENV=production /opt/mastodon/bin/tootctl media remove-headers --include-follows --days 7
    RAILS_ENV=production /opt/mastodon/bin/tootctl preview_cards remove --days 2
    RAILS_ENV=production /opt/mastodon/bin/tootctl media remove-orphans
  5. df -h Check disk space availability after cleanup

Clone this wiki locally