@Citali if you come from an older version, the rake tasks were removed, you should use tootctl to do the removal of media.
@Citali as the others said, the mastodon:media:remove_remote task was removed, you must use bundle exec bin/tootctl media remove --days=<number> --no-background
number = how old minimum must be the medias to remove, no-background makes tootctl remove medias one by one, and give back control to crond once it's done.
You can ommit this parameter, but then it will litteraly flood your sidekiq with jobs
Make the world a wild and fluffy place