Remove attachment completely

As Admin I have edited a post in which there was an attachment which is not allowed by our forum rules.

I removed the link to the attachment but the link remains in the edit history, and the attachment also remains (it can still be downloaded).

Can I completely remove/delete the attachment? (it’s a PDF file)

Search your admin settings for clean and you should get some options for handing orphaned uploads (though I don’t know if this is technically considered orphaned).

In the revision history, you should be able to hide a revision. I’m not sure those revisions are even viewable by non-moderators if it isn’t a wiki post.

Uploads (images/attachments) that are only referenced in a revision are indeed considered orphans.

By default revisions are visible to all users. You can disable this in site settings.

That won’t matter, though, because as @zogstrip pointed out, uploads referenced in old revisions get culled and deleted eventually.

Turning off all old revision viewing in this case would be a “boil the sea” solution and definitely not recommended.

To be clear, not suggesting that hiding revision history is the solution here - just clarifying Wes’s post.

Les pièces jointes des anciennes révisions seront supprimées définitivement avec le temps. Discourse ne conserve que les pièces jointes des messages actifs qui n’ont pas été supprimés, et l’historique des modifications ne compte pas comme un message actif et actuel.