Permanently Delete Posts/Topics

(Andrew Hunn) #1

I am a firm believer that some sort of functionality for admins to be able to permanently nuke a post from the DB needs to exist in a 1.0 Discourse release. The current functionality is very good for 99% of the use cases and I like how it’s baked into versioning.

However, there are definitely some extreme circumstances where the content of a post needs to be completely expunged from view by anyone. Sometimes even long-time posters will go too far and post something that they don’t want exposed online, even if to a handful of people (i.e. the admin team).

I realize implementing this has ramifications for all sorts of counters and data in the backend, but I think it’s a pretty critical safeguard for the forum owner to have in their toolset.

Complete removal
Way to permanently delete posts and messages as admin?
(Lee_Ars) #2

I disagree. I’ve run communities before that have had disagreements, and regardless of what individual posters want, it has always proven better for the admin team to have deleted posts available for reference. Even if people say dumb things in anger (or intoxication, or whatever), keeping bad posts around is handy when accusations & recriminations start flying.

If I were admin’ing a Discourse forum in production, I wouldn’t want the current functionality to change. It makes “deletion” a quick and handy way of hiding posts while preserving their original context for admins to view.

(Andrew Hunn) #3

I’ve spent the last 8 years running Elitist Jerks, so I am not speaking from a lack of experience.

Again, I think the vast majority of the time this feature goes unused. But there are very specific examples where I think information does need to be expunged from all public record. For a very crude example, what happens when someone with the appropriate trust level posts undesirable pictures to the community (be creative with your imagination for the kinds of things you’d not want left around for anyone, even other admins to find).

At the moment, the only way to deal with this is to complete some arcane DB procedure. I just think it’s wise to build in something that can be done from the front or back end. It needn’t be obvious or accessible.

Finally, and I know this argument doesn’t hold very much weight here in particular, but permanently deleting posts is something that every other large forum software I have ever worked with has implemented.

(Jeff Atwood) #4

But that’s just it – editing out the content does expunge it from the public record, even for mods. The only way to see it is to view revisions. And deleting the content removes it from view for the public.

You’re proposing expunging it from the private record as well.

Deleting a newly created post - inconsistent behaviour?
(Lee_Ars) #5

Except in cases of deleting spam, I’ve never run into a situation where outright deletion was preferable to instead moving a post to an admin-only area and hanging onto it for reference. I like Discourse’s approach.

(YMMV, of course—just my own anecdotal experience)

(Andrew Hunn) #6

Haha, yes I suppose I misspoke. I am proposing removing it from all record.

Again, I am not suggesting we change what’s already implemented. I think the current deletion system is great and highly usable for the almost every instance. I do, however, think that there are going to be quite a few legitimate use cases once Discourse is open to the wider public where admins may want to (or, in fact, need to) permanently remove damaging/embarrassing content.

I think I’d also like to get @frandallfarmer’s input on this as well. I am sure he has some valid opinions on it we might consider.


Here is a case where i really want to permanently remove a topic… i synced a topic with the wp-discourse plugin but the author didnt had his discourse username set in wp profile so the topic was synced with the default name. Now i am not able to re-assign this topic to the correct user, because i cant permanently remove it and it seems thats the reason why i cant re-sync it again.

Also, not being able to permenently remove something you dont want there, just takes unnecessary space.


I was thinking maybe a solution would be if there was an option to hide all deleted posts. An option which you could turn on/off in the admin section.

(shicholas) #9

I vehemently disagree. I think all ‘deleted’ posts should stay in the system.

@steelmaiden in response data is cheap and an admin can always hide this topic from the public.
@andrewkhunn permanently damaging/embarrassing content should be kept in case the victim wants to sue for defamation, but should be hidden from the public.

As someone who wants to keep a paper trial of everything, I hope this doesn’t get changed.

(Dr Emixam) #10

Why not using some kind of “folding” for deleted posts ?

In case of spam or flooding in existing threads, the threads will stay forever polluted for admins…

I agree for all the other cases, keeping everything is better.

(Theron Boerner) #11

You should be able to do a Post.find(<id>).destroy in extreme cases.

(Kane York) #12

To clarify, that is in a rails console:

cd /var/docker
git pull
./launcher enter app
rails c

(Kane York) #13

@DrEmixam, @steelmaiden, @Lee_Ars:

This “folding” is now available - deleted posts are now collapsed by default in latest:


For some reason if you do this, you deleted topic will show up on home page with -1 replies, anyhow to fix that?


@codinghorror @riking I think the current system works great for production systems.

However, if an admin is toying around with his trial deployment and can’t permanently delete posts that weren’t meant to be there or posts that he created intentionally or accidentally to test the software’s features, then we’re dealing with a system that isn’t really for admins and doesn’t account for mistakes during the trial process.

For example, on my community that I was planning on hosting with Discourse, I made some revisions, locks, and archives on the ToS and Privacy Policy, and then reverted those changes quickly after. Those things, although simple and unimportant, will always remain there for me and my community.

Quite frankly, it doesn’t matter that other’s can’t see them - I can. It’s like having a rock in your shoe, other’s don’t know it’s there, but it is and it’s bugging the crap out of you.

(Mittineague) #16

To me, them being collapsed makes them palatable enough.

But if even that bothers you some simple CSS might help as long is don’t mind having more trouble when / if you want to see them. {
  display: none;


@Mittineague That’s a nice hack, but it prevents us from using the good parts of deleted posts.

It’d be great if they gave us an option to permanently delete or just hide a post. Maybe the permanently delete would require you to type “delete” in a text box to make sure it’s intentional.


Does what looks to be 3.5k views on this topic not indicate that this is at least of some interest to users?

(Jeff Atwood) #19

it would be simpler to delete the database and start over if you have early trial testing efforts on posts that you need removed.


That’s fine. Do you allow users to SSH into the DO droplet that’s hosted by Discourse?

I’m not currently hosting on an individual license basis, but instead with your service.