Remove attachment completely

AI-generated summary

A discussion is taking place regarding completely removing an attachment from a post. precessor wants to know if it’s possible to delete a PDF attachment that remains accessible even after removing the link from the post. wesochuck suggests searching for “clean” in admin settings to find options for handling orphaned uploads. zogstrip clarifies that uploads referenced only in a revision are considered orphans. jomaxro notes that by default, revisions are visible to all users, but this can be disabled in site settings. However, codinghorror and codinghorror explain that attachments in old revisions will be permanently deleted over time, and jomaxro agrees that hiding revision history is not the solution.

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.

Attachments in old revisions will be permanently deleted over time. Discourse only retains attachments in live posts that are not deleted, and edit history does not count as a live, current post.