Remove locally cached media attachments.
Display media usage.
$ RAILS_ENV=production /home/mastodon/live/bin/tootctl media usage
Attachments: 1.78 GB (2.56 MB local) Custom emoji: 229 MB (9.58 KB local) Preview cards: 1.1 GB Avatars: 754 MB (22.7 KB local) Headers: 1.92 GB (357 KB local) Backups: 0 Bytes Imports: 0 Bytes Settings: 0 Bytes
Display help information for media remove command.
$ RAILS_ENV=production /home/mastodon/live/bin/tootctl media remove --help
Usage: tootctl media remove Options: d, [--days=N] # Default: 7 [--prune-profiles], [--no-prune-profiles] [--remove-headers], [--no-remove-headers] [--include-follows], [--no-include-follows] c, [--concurrency=N] # Default: 5 [--dry-run], [--no-dry-run] Description: Removes locally cached copies of media attachments (and optionally profile headers and avatars) from other servers. By default, only media attachements are removed. The --days option specifies how old media attachments have to be before they are removed. In case of avatars and headers, it specifies how old the last webfinger request and update to the user has to be before they are pruned. It defaults to 7 days. If --prune-profiles is specified, only avatars and headers are removed. If --remove-headers is specified, only headers are removed. If --include-follows is specified along with --prune-profiles or --remove-headers, all non-local profiles will be pruned irrespective of follow status. By default, only accounts that are not followed by or following anyone locally are pruned.
Remove profile headers and avatars older than 3 weeks.
$ RAILS_ENV=production /home/mastodon/live/bin/tootctl media remove --days 21 --prune-profiles --concurrency 4 --dry-run
8345/8345 |====================================================================| Time: 00:00:08 Visited 8345 accounts and removed profile media totaling 777 MB (DRY RUN)
$ RAILS_ENV=production /home/mastodon/live/bin/tootctl media remove --days 21 --prune-profiles --concurrency 4
8345/8345 |====================================================================| Time: 00:00:20 Visited 8345 accounts and removed profile media totaling 777 MB
Remove media attachments older than 3 weeks.
$ RAILS_ENV=production /home/mastodon/live/bin/tootctl media remove --concurrency 4 --dry-run
259/259 |====================================================================|| Time: 00:00:00 Removed 259 media attachments (approx. 130 MB) (DRY RUN)
$ RAILS_ENV=production /home/mastodon/live/bin/tootctl media remove --concurrency 4
259/259 |====================================================================|| Time: 00:00:01 Removed 259 media attachments (approx. 130 MB)
Display help information for preview_cards remove command.
$ RAILS_ENV=production /home/mastodon/live/bin/tootctl preview_cards remove --help
Usage: tootctl preview_cards remove Options: [--days=N] # Default: 180 c, [--concurrency=N] # Default: 5 v, [--verbose], [--no-verbose] [--dry-run], [--no-dry-run] [--link], [--no-link] Description: Removes local thumbnails for preview cards. The --days option specifies how old preview cards have to be before they are removed. It defaults to 180 days. Since preview cards will not be re-fetched unless the link is re-posted after 2 weeks from last time, it is not recommended to delete preview cards within the last 14 days. With the --link option, only link-type preview cards will be deleted, leaving video and photo cards untouched.
Remove local thumbnails for preview cards older than 3 weeks.
$ RAILS_ENV=production /home/mastodon/live/bin/tootctl preview_cards remove --days 21 --concurrency 4 --dry-run
31702/31702 |====================================================================|| Time: 00:00:08 Removed 31702 preview cards (approx. 994 MB) (DRY RUN)
$ RAILS_ENV=production /home/mastodon/live/bin/tootctl preview_cards remove --days 21 --concurrency 4
31702/31702 |====================================================================|| Time: 00:01:42 Removed 31702 preview cards (approx. 994 MB)
Display media usage.
$ RAILS_ENV=production /home/mastodon/live/bin/tootctl media usage
Attachments: 1.65 GB (2.56 MB local) Custom emoji: 229 MB (9.58 KB local) Preview cards: 130 MB Avatars: 534 MB (22.7 KB local) Headers: 1.38 GB (357 KB local) Backups: 0 Bytes Imports: 0 Bytes Settings: 0 Bytes