@thanius I'm doing those types of tasks, also. I just vacuumed my database. Being self-hosted, I use several relays and it gets big with garbage that should be cleaned out and for whatever reason, autovacuum is not keeping up and I'm not too keen to tweak it right now. Reduced my database by 10GB
Code I used, after a backup of the db, is
su - mastodon -s /bin/bash
psql mastodon_production mastodon
VACUUM(FULL, ANALYZE, VERBOSE);
I'm on a Debian VPS box, not docker, nor managed hosting.
#MastoAdmin https://www.postgresql.org/docs/current/sql-vacuum.html