How to remove post completely?


Hey there!

I want to remove a post completely. For example can I delete post shown below? I don’t want to see this deleted post shown in red, even if they’re only visible to staff. (If you wondered why I want to remove it, because I have obsession.)

I think discourse is a very pleasant forum software. But sometimes it makes me laugh. I can do a lot of thing as an admin, but I can’t delete post completely… What a contradiction! :blush:

Can't pin 'about site feedback ' without date + moving 'welcome to'
(Jeff Atwood) #2

You’ll need to edit the database directly to do that.


Hmm. @codinghorror do you think that it is good idea to put a simple button in post controls area to remove posts completely? Is this possible for developers? If it is, I (and probably another people) would be very happy…

(Sam Saffron) #4

Sorry, this is not planned. We have a feature that allows you to remove edits if someone pastes in a password by mistake, but “nuking topics, with fire, with ZERO undo” is not something we plan to make easy.


Can you please just tell that is possible or not? For example by a plugin? I just can’t understand why at least admins can’t delete posts completely. May I ask what was the philosophy behind this idea?

(Sam Saffron) #6

Sure, it is possible, you just have to write the plugin.

Actions you take should be undo-able.


From the users perspective, I agree with that. If we talk about administrators (which is mean a person who have full permission over community) he/she should be able to remove anything completely he/she want.

He/she can remove post completely from DB, right? Why he/she can’t do it directly from discourse then? You just complicate things for admins.

I really wish I could develop extension for this feature, but I don’t have ruby skills… So, if someone read this topic, and he/she have a skill in ruby, please gain this feature to Discourse, thanks. :love_letter:

(Mittineague) #8

This discussion seems to be drifting from “obsessive” to feature.

The main thing to remember is that from a non-staff perspective,
“deleted” is effectively deleted

If the concern is more like a "OMG ! I made a post and now that I think about it I want to remove all traces before someone finds out"
then IMHO it is better to train yourself as best as you can to step back, take a breath, and think before you post.

To emphasize

The main thing to remember is that from a non-staff perspective,
“deleted” is effectively deleted


You miss the point like others did. Why all you guys saying same thing like robots?

Yes, from non-staff perspective “deleted” is effectively deleted. But from staff perspective, “deleted” is still in DB. Think about there is 250k post “deleted” from non-staff perspective. Everything is OK from non-staff perspective. But from staff perspective they’re still in DB and most of them deleted about one year ago. Why should I keep them in my database? I’m an admin and I can’t delete post completely.

I’m not talking about privacy, or remove traces or stuff like that. I’m talking about wasting of disk usage. Waste of database. Doesn’t matter, I’m an admin, I purchased this server, I set up discourse, I’ve all passwords, I’ve full access to my server. If I want, I can completely close my community but guess what. I can’t delete post from directly my beautiful discourse.

Look at Flarum. They have two button. One if them is “delete” which is deletes a post from non-staff perspective. Other is “Delete forever” which is deletes a “deleted” post from staff perspective too.

(Jay Pfaffman) #10

The "robots’ " perspective is that few communities will have need to delete that many posts, and disk space is cheap. They just aren’t concerned with saving a even a few hundred MB of space.

I can see how it seems a bit odd, but thus far, no one with the skills to add that feature has wanted to.

(Mittineague) #11

I see the reason has now changed from “obsessive” to “saving disk space”.

To get back on topic, the reality is that it is possible, however

With a thorough knowledge of the Discourse database and how routing works it would be possible to remove posts from the database without breaking the forum.

If it is that important to you to remove posts from the database, I suggest you post in the Marketplace here or hire a developer elsewhere to put together the code needed to do so.

I’m relatively sure that if you provided a large enough “bounty” someone would be willing to take on the task.

(Eli the Bearded) #12

Discourse has a philosophy, doing things that are against that philosophy are not made easy.

The stated aspect of the philosophy at play is “Actions you take should be undo-able.” That includes actions by admins, who may not be not be expert in the forum at the time they do something.

(TomG) #13

This is exactly what has happened to me but I don’t seem to be able to delete the revision. Where is this option? I only seem able to hide the revision with the password but that is still visible to Mods as far as I can tell.

(Sam Saffron) #14

Yeah, you need a moderator for that, flag your post for moderator attention and the mod can take care of it.

(TomG) #15

Sorry, I was unclear. I am both a Mod and an Admin and I am looking for a way to hide an inadvertantly exposed password. I have edited the post and hidden the revision. My concern is that this users password is still viewable by my Mod user. Can the revision be deleted or hidden further?

(Sam Saffron) #16

You would require database access for that.

(Jay Pfaffman) #17

It’s not a very satisfying answer, but once the person exposed the password, they should change it. Even if you could remove it, the cat is out of the bag.

(Stephen) #18

I don’t see any problem with it personally, once the user makes an error they have to take remedial action too.

The internet has a degree of permanence that no amount of extra code will fix.

(TomG) #19

They should absolutely change their password, and all other sites that use the same password (probably all). Unfortunately, most people won’t.

I’ve done a rake/rebake to mitigate the risk for now.

(hosna) #20

Is there still no way to delete deleted posts from the database? Maybe an option in admin panel to remove deleted post from the database after x month would be a good idea.