Introducing permanently delete post functionality

When a post is deleted in Discourse, we perform a soft-delete. This means that post is still present in the database in case an administrator wants to recover it later. A soft-delete is not sufficient when the deleted post contains sensitive information and must be pruned from the database completely. For those situations, we are introducing the ability to permanently delete a post.

This feature was implemented under a hidden site setting because of how dangerous it can be, once a post is destroyed it cannot be recovered. As an additional protection mechanism, posts can be permanently deleted by the same administrator who deleted the post only after 5 minutes have passed OR by a different administrator immediately. If post cannot be deleted because none of the preconditions were met, it will show an error message:

If your site is hosted by us, contact us and we will enable it for you. If you host it yourself, to enable it you must enter the console (rails c) and change the site setting value:

SiteSetting.can_permanently_delete = true
76 Likes
Admin Deleting Posts
How can I delete a topic permanently?
Permanent deletion bug
How to permanently delete a post?
Error when attempting to permanently delete as moderator
Permanent deletion: Is there a database command?
Copyright regarding creations with high level of creation and the right of deletion
Delete topics and posts final
Soft-delete override?
Deleted post is still there shown as a hidden post
Permanent deletion: Function not available
Re-use of `external_id` after a Topic is deleted
"There was an error deleting that topic. Please contact the site's administrator"
Introduce a way to also permanently delete the sensitive info from the staff logs
How to delete post permanently?
Permanent bulk delete of old topics
Deleted replies and topics - are they purged from db or do they stay forever in db?
How to make an undeleteable topic?
永久删除帖子后,其中的图片及其它附件也会被删除么?
Error during permanently deleting a post of a deleted user
Purge/clean/delete deleted topics from database
How can I permanently delete a topic with multiple posts?
Digital Online Safety
Enable setting to allow admins to permanently delete data
Add a warning when checking personal messages from a user public profile, as an admin
Does enabling Permanently Delete require a rebuild?
How to remove post completely?
Why is it not possible to permanently delete topics or posts?
Create list of links to all soft-deleted posts
Are there any performance or inconsistency issues when using Permanently Delete?
Permanent bulk delete of old topics
Deleting all posts in personal message not working
Hidden Settings on Discourse Hosted Sites
Final deletion does not work correctly