curl -sS -X DELETE 'https://matrix.example.com/_synapse/admin/v1/media/example.com/abcde12345' -H "Authorization: Bearer $ACCESS_TOKEN"

Category: Matrix & Synapse

curl -sS -X DELETE 'https://matrix.example.com/_synapse/admin/v1/media/example.com/abcde12345' -H "Authorization: Bearer $ACCESS_TOKEN"

Delete one local media file from disk

Permanently removes the media file and its thumbnails from your server's disk. Only local media can be deleted this way; cached copies of remote media are purged via the purge_media_cache endpoint instead. Confirm the item with the inspect endpoint first, since deletion cannot be undone. External media repositories are unaffected.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.