#preview_cards
Can I get the database for like 20 users to come in below 60GB for a minute? FFS what do we need to do to delete 10GB+ of useless preview_cards? This costs $50/month for us, to what... save NYT a bit of bandwidth? #Mastodon
October 25, 2026 at 3:24 AM
just PreviewCard.destroy_all? #preview_cards

mastodon.mariobreskic.de/@mario/115049722717640781

LMAO trigger block_preview_card_insert
mastodon.mariobreskic.de/@mario/115050721312753972
October 1, 2026 at 7:33 AM
#Mastodon hosting seems unsustainable after a few years, purging cached content breaks history (and it never refreshes/ reconnects threads properly after that?) and there's other content like #preview_cards that can't be cleaned out. I'm not sure how much of the cost is in abandoned accounts […]
Original post on urbanists.social
urbanists.social
October 1, 2026 at 3:24 AM
a #preview_cards table is quietly one of #Mastodon's greatest polluters, and nobody's talking about it.
https://docs.joinmastodon.org/entities/PreviewCard/ […]

[Original post on urbanists.social]
September 7, 2026 at 4:29 AM
@nev there are probably some issues about it even before that, but the kicker for me was the preview_cards rows referenced by *only* preview_cards_statuses references to posts that were purged by `tootctl statuses remove` long ago
September 7, 2026 at 5:16 AM
wtf, delete the feature and save $100/mo? #preview_cards github.com/mastodon/mastodon/issues/38349
September 3, 2026 at 5:06 AM
How are we going to get new users onto #Mastodon when bots have made open signups unworkable and corporate media has bloated our preview_cards table to where it cost $200/mo to run on masto.host?
September 3, 2026 at 4:58 AM
And the first request is some preview_cards image that's not even on the screen. Fuck it, I'm going to dry-can some grilled burgers in my PC. Winter is coming.
August 22, 2026 at 7:17 AM
RE: https://urbanists.social/@enobacon/117114698498800029

#Mastodon give us control of the preview_cards table challenge?
urbanists.social
August 18, 2026 at 4:49 AM
and run these daily in a cronscript:
‪
run_cmd bin/tootctl media remove --days 1
run_cmd bin/tootctl preview_cards remove
run_cmd bin/tootctl media remove-orphans
run_cmd bin/tootctl media remove --prune-profiles
run_cmd bin/tootctl cache clear
run_cmd bin/tootctl media remove --remove-headers
March 22, 2026 at 12:28 AM
i run these via cron , no space issues!
run_cmd bin/tootctl media remove --days 1
run_cmd bin/tootctl preview_cards remove
run_cmd bin/tootctl media remove-orphans
run_cmd bin/tootctl media remove --prune-profiles
run_cmd bin/tootctl cache clear
run_cmd bin/tootctl media remove --remove-headers
March 21, 2026 at 12:22 AM
Here's my suggestions for toolctl

tootctl media remove

tootctl media remove-orphans

tootctl preview_cards remove

tootctl media remove --prune-profiles

tootctl media remove --remove-headers

tootctl cache clear

tootctl statuses remove

tootctl accounts prune […]
Original post on mstdn.science
mstdn.science
May 1, 2026 at 2:53 PM
I copied everything in the S3 bucket to another one, except for the "cache" dir. I then set the bew bucket as the default one. Then I did (after backing up the DB):

TRUNCATE preview_cards CASCADE;

UPDATE accounts
SET avatar_file_name = NULL,
avatar_updated_at = NULL,
header_file_name = NULL […]
Original post on fedi.turbofish.cc
fedi.turbofish.cc
January 9, 2026 at 12:20 AM
@bjo

tootctl accounts prune
tootctl statuses remove --days 3
tootctl media remove --days 3
tootctl preview_cards remove --days 3
tootctl media remove --remove-headers --include-follows --days 3
tootctl media remove --prune-profiles --include-follows --days 3
tootctl media remove-orphans
January 8, 2026 at 11:04 PM
RE: https://mastodon.social/@Mastodon/116489457177711947

when do we get to delete five years worth of redundant preview_cards data?
You heard it here first: Mastodon 5.0 (eta Fall 2026) will introduce major improvements to the core user experience. We're making Mastodon the most human-centred software on the #socialweb.

That’s where you come in.

Discovery Week 🗓️ 11-15 May 2026

Join our Head of Design @imanijoy for a […]
Original post on mastodon.social
mastodon.social
April 30, 2026 at 3:54 AM
@qagggy.bsky.social Did you ever see a carpool by a school? Also I swear @ai6yr posted a link to the youtube of this recently ( bEipCKDDKtE ?) but how does mastodon search avoid indexing links yet we have a 14GB preview_cards table that cannot be deleted? […]
Original post on urbanists.social
urbanists.social
April 20, 2026 at 5:53 AM
And the tootctl tool doesn't even have a way to prune this 14GB preview_cards table?? This is ridiculous, basically no way to control DB size (and thus monthly costs) on masto.host. #Mastodon
March 24, 2026 at 12:32 AM
How much of the $140/month we are paying is for preview cards? I might rather turn them off. Paywalled websites should pay us to host their preview cards. #Mastodon

We have 14.5M statuses, only 350k local.
accounts: 6.8k local of 956k
50 active users, 100?
March 22, 2026 at 7:58 PM
wtf 23M preview_cards ayfkm ... psql, (how do I turn timing on after I start a query that wanders off to do a full table scan) what's up with this index spending a couple minutes to count the primary key? #postgres
March 22, 2026 at 6:41 PM
@thomas meine Beobachtung auf pnpde.social ist auch, dass remove-orphans gar nicht soviel freisetzt. Ich lasse täglich statuses remove, media remove und preview_cards remove laufen ( […]

[Original post on metalhead.club]
June 2, 2025 at 7:31 AM
Mastodonで #TootRoot と一緒に修正されたCVE-2023-36459が、プレビューカードのHTML「サニタイズ」(Mastodonがそう言っているから仕方ない)不備によるXSSについて、とあるところで「`tootctl preview_cards remove`しなくていいんでしたっけ?」と尋ねてしまったのだけど、`tootctl preview_cards remove`は「画像」を消すコマンドだと突っ込まれて、自分の間抜けさに呆れている顔をしている。
July 10, 2023 at 5:45 AM