Moderators were granted the ability to undelete comments, primarily to make cleaning up long comment threads more efficient. The idea was for the moderator to purge all comments, then selectively undelete those deemed worthy of continued existence.

The moderator UI only allows moderators to undelete a comment deleted by a current moderator. Moderators cannot undelete comments deleted by community flags (including single-flag deletions), or by the comment author themselves through the UI[Note 1].

The system does not enforce this on the backend, so user scripts exist to allow moderators to undelete any comment — including those deleted by non-moderators through whatever code path (including self-deleted comments).

An example use of this is a moderator undeleting self- or flag-deleted comment(s) in a long chain, where the missing comment(s) make the rest of the thread hard to follow, or otherwise result in the loss of content with lasting value.

  1. Should moderators be able to undelete any comment?
  2. Should this ability be added to the moderator tools UI?
  3. Or should the current UI behaviour be enforced server-side?

Related Q & A:

Note 1: Main on-site moderator UI only. There is a separate page where universal deletion is possible, but it is unclear if this is by design — it is certainly not well-known among moderators.

  • Note: moderators already have the ability to undelete any comment. The ability to do so is on the page listing all comments by a user.
    – Makyen
    Commented Jun 21, 2021 at 16:11

5 Answers 5


I think moderators should be able to undelete, in addition to comments deleted by diamond moderators or the Community bot which moderators are already able to undelete:

  • comments deleted by a single flag (able to be deleted by one flagging user because they contain some keyword such as "fuck" or "accepting");
  • comments deleted by multiple flags (3+(comment score/3) flags (rounded up) needed);
  • comments deleted by ex-moderators who no longer have diamonds;

but moderators should NOT be able to undelete:

  • comments self-deleted by the person who originally posted the comment.

The rationale for this is as follows:

  • The power to remove any comment permanently from the site, even if moderators and the community find it a worthwhile comment, shouldn't rest in the hands of any user with 15+ rep who's able to flag. The single-flag deletion of comments has been problematic on sites where the linguistic discussion of swearwords is on-topic, or where confirmatory comments from the OP are used to determine a post's duplicate status. I imagine it could also be problematic if, for example, the issue of a community being "accepting" or not was being discussed on meta.

  • If a comment is deleted by multiple flagging users, at least there's a little more existence of checks and balances here than for comments deleted by just one. Still, if someone wants to get rid of a comment they don't like, it's trivially easy to whip up a couple of socks to 15 reputation and use this trio of accounts to flag away happily. The fact that this can happen without oversight is bad enough, but at least allow it to be reversed by diamond moderators if it does happen!

  • Comments deleted by moderators can usually be undeleted by other moderators. Why should this stop being the case if the deleting moderator loses their diamond? If anything, it's more likely that an ex-moderator's decisions should be reversed than a current moderator's. Sometimes (rarely) a moderator is forcibly removed due to poor behaviour, which might include being overly heavy-handed with deletion.

  • The original poster of a comment, on the other hand, should retain the right to delete it absolutely, so that it can't be undeleted by others. Maybe a comment contains some identifying information that the OP doesn't want to be left available on the site - and, unlike posts, comments cannot be anonymised. If you posted a comment and you want to delete it, fair play to you. (That goes for whether you're a moderator or not, by the way. Currently, comments self-deleted by a diamond mod can be undeleted by any other diamond mod on the same site.)

I accept that many of the potential scenarios I've outlined above are extremely unlikely; however, it can still be considered that they might happen sometime, somewhere. I don't see any particular advantage in disallowing mods to undelete comments from ex-mods, or flag-deleted comments, but there could potentially be disadvantages, even if unlikely ones.

So my proposal is:

To decide whether or not a comment can be undeleted by a diamond bearer, rather than checking for "does the deleter have a diamond?", check for "does the deleter have the same user ID as the commenter?" instead.

Or alternatively:

Rather than running either of the above checks individually, check for "does the deleter have the same user ID as the commenter AND not have a diamond?".

This would allow current mods to undelete their own comments, but disallow undeletion of other comments deleted by the original commenter (including if that commenter is an ex-mod).

  • 5
    Should moderators be able to undelete their own comments? If so your logic needs tweaking a little. Commented Jun 19, 2021 at 11:11
  • @RobertLongson See my parenthetical in the last bullet point. I'd be happy to treat mods the same as everyone else when it comes to undeleting their own comments. Commented Jun 19, 2021 at 12:19
  • I might be mis-remembering, but I'm fairly sure I've deleted my own comment on SO thinking it was nonsense, then realised it wasn't and was able to undelete it myself... Commented Jun 19, 2021 at 12:41
  • 1
    I upvoted your answer thinking Robert Longson's interpretation was correct. If a moderator makes a bad call and deletes a comment thread they're a part of; what your suggesting is that another moderator can't undelete all the comments. Moderators are not infallible and I think having a system which assumes they are isn't a good idea in the slightest.
    – Peilonrayz
    Commented Jun 19, 2021 at 12:44
  • I think primary reason why mods can't revert self-deletion is that author can then re-delete and we want to simply prevent such back-and-forth. This could in theory be prevented by some change in a system but we probably don't want such complications for "second class citizen" feature which is intended to be typically unimportant. In case when moderator feels it's important for regular users to know what was in deleted comments they can quote these or post screen shots (such cases, again, are expected to be rare because system isn't designed to have important things in comments)
    – gnat
    Commented Jun 19, 2021 at 13:35
  • @JonClements Was that during your non-mod period? On my mod sites, I can easily delete-undelete my comments anywhere. Commented Jun 19, 2021 at 13:56
  • @Peilonrayz Fair enough; I've edited in an alternative proposal as well. If others feel strongly that mod-self-deleted comments should be undelete-able, that's fine with me too. Commented Jun 19, 2021 at 14:00
  • cc @RobertLongson - see latest edit. Commented Jun 19, 2021 at 14:01
  • @Randal'Thor think I misread what you'd said... I read your comments self-deleted by a diamond mod can be undeleted by any other diamond mod on the same site as the moderator can't undelete their own comment and that it required another mod to do so... I think Robert's comment threw me slightly... that and suffering from hayfever... so ignore me :p Commented Jun 19, 2021 at 14:03

Note: Moderators can, currently, undelete any comment. However, the ability to do so is, for some comments, only exposed in the stock user interface when looking at all comments made by a user, rather than when viewing deleted comments on posts. That user interface shows only a list of the user's comments (i.e. it doesn't show any of the context surrounding the comment).

Moderators should have, and already do have, the ability to undelete any comment

That doesn't mean that undeleting a comment should be done without thought and due consideration for the author, the community, etc.

Moderators are exception handlers. Not having the ability to undelete some comments means that there's a set of comments, which can be identified by a program written in advance, which will never have an exceptional situation occur where undeleting those comments is a good option. In my opinion, it's not possible to identify in advance a class of comments which will never have an exception.

Moderators are expected to exercise judgement in their actions. That an ability exists doesn't mean that it should be used for no reason. Moderators are elected specifically to exercise their judgement as to what is best to do in situations which can't be programmatically determined in advance. Thus, moderators should be given the ability to exercise that judgement (i.e. should have the ability to undelete all comments).

As with all moderator actions, there is always the option to appeal to Stack Exchange's Community Managers if there is a belief that the moderator's actions were inappropriate.

A sticking point for many people is the undeletion of comments deleted by the comment's author:
Moderators currently have the ability to undelete any user's posts. They exercise judgement as to what is best for the community when considering if a post should be undeleted. This includes weighing the author's clear desire to delete the content balanced against the content's value to the community. Comments are, to a significant extent, quite similar. It is, however, much more rare that a comment's benefit to the community would outweigh the author's desire to delete it. However, particularly on Meta sites, where significant discussion happens in comments, there are entire discussions which could become quite difficult to understand if a user chose to delete all of their comments. While a large portions of those discussion can, and should be, handled by just deleting the other comments which are now difficult to understand, it's impossible to say that there will never be a case where the best choice for the community is to undelete the user's comments, potentially editing them to remove an unnecessary portion which was what the user was primarily concerned about (but couldn't edit, due to the 5 minute limit on editing).


As with all content which is contributed to Stack Exchange, users don't have a right to delete it. That they don't have that right is very explicitly stated in the Terms of Service. They've contributed that content to the community. In some cases, the community's interest in the content outweighs the user's desire to delete it. Judging when that may occur is something only a human can do, which is one of the things moderators exist to do.

Right to disassociate themselves from content:
Under the CC BY-SA licenses, people have the right to request that attribution to them be removed from the content which they contribute (a process commonly called "dissociation"). The ability for users to be able to make such requests and have the requests acted upon needs to be maintained. However, requesting dissociation is substantially different than just deleting the content. Just deleting something definitely doesn't automatically indicate the user's desire for dissociation.

For other content (i.e. questions and answers), users can use the "Contact/Contact Us" link at the bottom of every page to request dissociation. Some people also use the unofficial route of raising a flag to request that happen, which moderators can escalate to the Community Managers. There's no reason that a user can't already use the same process to request dissociation from their comment.

Current technical limitations:
Unlike questions and answers, the system doesn't have an automatic method to allow Community Managers to remove the user's name from association with a comment. As a result of that lack of capability, when dissociation has been requested, a very, very rare thing, the comment has just been deleted, presumably by a Community Manager. Unfortunately, just deleting the comment doesn't actually comply with the CC BY-SA license, because the content is still distributed to some people (moderators) under some conditions (note: showing moderators the associated comment may be valid under other licenses granted to Stack Exchange for the content in some versions of the Terms of Service). So, if there is going to be actual compliance with CC BY-SA, then the technical capability to actually dissociate the user from the comment needs to be developed. However, this current technical limitation doesn't mean that moderators should be unable to undelete the comments where dissociation has not been requested.

  • 1
    You are speaking as a mater of principles, but you don't offer any specific use case. Other than "moderators are able to do X, why not Y", I don't see any precise argument in favor of this.
    – Braiam
    Commented Jun 21, 2021 at 11:05
  • 1
    @Braiam I think there was a whole section on exception handling that might cover it.
    – Mast
    Commented Jun 21, 2021 at 17:09
  • 1
    @Mast that's not enough. Moderators have access to our IP's not because they are moderators, but because it's useful to identify undesired patterns. Being a moderator isn't enough reason on its own.
    – Braiam
    Commented Jun 21, 2021 at 20:01
  • 1
    @Braiam One case where the capability is used, sometimes, is when a user rage quits. While there's certainly a preference for folding information from comments into posts or removing the entire conversation, that's not always the best option for the community. Given that the ability for moderators to undelete any comment is already a stock part of the user interface, just inconveniently located, can you provide an example where it has been inappropriately used and that inappropriate use hasn't been resolved through the already existing channels available for reviewing moderator actions?
    – Makyen
    Commented Jun 21, 2021 at 20:19
  • 1
    @Makyen: The (hypothetical) rage quitter has an absolute right to request dissociation of all content simultaneously, including all comments. All they have to do is click the Contact Us link, and then moderators won't be allowed to undelete the comments anyway.
    – Kevin
    Commented Jun 21, 2021 at 22:09
  • 1
    @Kevin As I've said, there is a significant difference between deleting and requesting dissociation. That SE has chosen not to fully comply with the CC BY-SA license is a significant and interconnected issue. However, a user deleting their comment isn't a request for dissociation. Even if it was, deleted comments are shown to moderators upon moderators clicking to show them. When shown, the deleted comments include the author, which isn't permitted under CC BY-SA after dissociation (but may be permitted under other licenses granted to SE under various versions of the ToS).
    – Makyen
    Commented Jun 21, 2021 at 22:22
  • 2
    @Makyen: That's beside the point. If the user does request dissociation for all content, then SE has to comply to the best of its ability (CC-BY-SA does have a "to the extent practicable" clause). Currently, SE's implementation of that requirement is to delete the comment. So, if a given community is of the opinion that users nuking all of their comments is problematic, then that community has a problem, and needs to either convince SE to implement comment dissociation differently, or accept that users can irreversibly nuke all their comments at once, if they so choose.
    – Kevin
    Commented Jun 21, 2021 at 22:52
  • 1
    @Kevin You're still equating a user deleting their comment with a request for dissociation, or assuming that the user deleting their own comment would look the same to moderators as that comment deleted by a CM in response to a request for dissociation. They don't look the same. It is clear when viewing deleted comments who deleted it. One would expect a moderator would ask the CM why the CM deleted a comment prior to undeleting it. If that hasn't happened, or if you've seen somewhere where a comment has been undeleted where a user has requested dissociation, then please provide the example.
    – Makyen
    Commented Jun 21, 2021 at 23:03
  • 2
    @Makyen: That is not what I am suggesting at all. I am suggesting that any community which depends on the ability to prevent users from deleting all of their comments is relying on an ability which they do not actually possess. I never said that anyone is confusing deletion with dissociation, and I really wish you'd stop trying to pivot the conversation back to deletion, which is wholly unrelated.
    – Kevin
    Commented Jun 21, 2021 at 23:23
  • 1
    @Kevin Moderators do have that ability. Moderators can undelete the content and, if the user continues to delete it, then the user is suspended. That's standard operating procedure for user's who are rage quitting. Yes, the user could then request dissociation of all their content, which would very likely result in the user being given a choice by SE of dissociation through the deletion of their account, or not dissociating all content. If their account is deleted, then the user is dissociated from comments to a similar extent as if they were deleted, but the content wouldn't be deleted.
    – Makyen
    Commented Jun 21, 2021 at 23:29

Yes, I think elected moderators should be able to undelete any deleted comment.

Moderating comments is already very time-consuming, and anything that makes them easier to moderate is useful for moderators, and for those who flag moderators to moderate comments.

As a moderator of two sites I do not recall any instance where I wanted to undelete a comment and could not, so I am not sure that the current tools need any modification in this regard. However, if any change is made, then I think it should only be to simplify the circumstance when moderators can undelete comments to be always.

  • 3
    " I do not recall any instance where I wanted to undelete a comment and could not" Is that because you're using one of the scripts the OP has referred to or because you didn't really need to undelete a comment that hadn't been deleted by a mod? If it's the latter, then that could be used as an argument against "Yes, I think elected moderators should be able to undelete any deleted comment", not for it.
    – 41686d6564
    Commented Jun 19, 2021 at 11:25
  • 1
    @41686d6564 I don’t use any scripts with SE. I delete a LOT of comments, and sometimes I need to undelete. If I cannot already undelete any deleted comment on the sites I moderate then I am happy not to expend developer time supporting a complex rule set. I think elected moderators should be able to undelete any deleted comment.
    – PolyGeo
    Commented Jun 19, 2021 at 11:37
  • Your answer is self-contradictory. Please edit it so it gives one message. The UI doesn't provide an "undelete" button for all deleted comments. Thus, saying that moderators should be able to undelete all comments and that the tools should not be changed are self-contradictory.
    – Makyen
    Commented Jun 19, 2021 at 15:51
  • @Makyen I hope my answer is clearer now. My message is don’t change to something that makes it harder for moderators to undelete a comment when they need to. However, if the code is opened up, then hanging to being able to undelete always would be a positive change.
    – PolyGeo
    Commented Jun 19, 2021 at 20:24


What are comments?
Comments are temporary "Post-It" notes left on a question or answer. They can be upvoted (but not downvoted) and flagged, but do not generate reputation. There's no revision history, and when they are deleted they're gone for good.

I’m going to take the unpopular position here and say no, we shouldn’t expand a moderator’s ability to undelete comments. “Comments are intended to be ephemeral” cuts both ways. Moderators can see deleted comments, so if it was truly that important that the information in that comment be preserved, the moderator can take appropriate steps to incorporate it into a post, leave a comment that is more obviously relevant and less likely to get deleted, or whatever is appropriate.

If we find that unsatisfactory, then comments need to be promoted to be equal to the other content on the site and we should give up telling people they shouldn’t care if their comments are deleted because they’re intended to be temporary. I think it would be worthwhile to completely rethink how we accomplish the necessary discussion about posts that comments provide, taking into account everything we’ve learned from the existing system. The energy and resources involved in moderating comments is currently ridiculous in my opinion.

I would not support blocking scripts from undeleting comments unless there is a vulnerability that needs to be fixed. My position is basically that we should stop anything other than critical fixes to the existing system that we’ve outgrown, and start designing a better system to provide the ability for a community to collaborate on posts.

  • 1
    And I think that giving moderators the power to override community deletions is unwise. Some people already get really pissed when their comments are deleted, especially since they can’t see that other comments are getting deleted too. If you add the ability to restore a comment a user voted to delete, you’re making it even more likely users will perceive comment moderation as unfair. Comment moderation is one of the least transparent types of moderation on the network, so the consequences of expanding it need to be carefully considered.
    – ColleenV
    Commented Jun 19, 2021 at 14:24
  • 2
    Sometimes, information in comments is used to take moderation actions that don't/shouldn't require diamonds, like duplicate closures. If such comments are deleted, it would be helpful if moderators could undelete them, for enduring transparency about why the action was taken. Commented Jun 19, 2021 at 16:03
  • 5
    A user on my site flagged a comment which contained the name of a programming language "brainfuck". The comment is absolutely fine and is fine to stay forever on my site. The flag also had nothing to do with the words "brainfuck" or "fuck" but the system saw the token "fuck" and deleted the comment. What are your view on fixing false positives made by an overzealous system? No-one in the situation wanted the comment deleted.
    – Peilonrayz
    Commented Jun 19, 2021 at 16:28
  • @Peilonrayz If that information is important, it shouldn’t be in a comment. Or at least that’s the theory according to all of the documentation I’ve seen. What’s important, the comment or the information it contains? I understand there are many situations where having that power would be nice, but I think it is treating symptoms instead of the root cause. Someone wanting to keep a comment around doesn’t necessarily mean it should be kept around.
    – ColleenV
    Commented Jun 19, 2021 at 18:56
  • @ColleenV In the instance I'm referencing the comment. The flagger wanted to reply to the comment, however flagged first. The instadelete nuked the comment and the user could no-longer ping the author of the comment. Additionally the information in the comment is very inappropriate to add to the answer as the comment conflicts with the answerer's intent. Whilst the information is important the only option is to leave the comment around, according to the editing rules.
    – Peilonrayz
    Commented Jun 19, 2021 at 19:03
  • 1
    @Peilonrayz And the reply to the deleted comment was really important because? My perspective is that the comment system is fundamentally flawed, and continuing to expand it is a waste of effort that should be going toward replacing it with something more effective. I would not support adding anything more to it (even checks to prevent user scripts from doing things not exposed in the GUI). The fact that scripts can already bypass the checks in the GUI is just further supports my opinion that the current comment system is unsustainable.
    – ColleenV
    Commented Jun 19, 2021 at 19:18
  • @ColleenV Given the system nuked the comment, no reply was posted. So I do not know, but given the existing comment I would guess the comment would have valid and information (pinging the commenter) and wouldn't ever need to be deleted.
    – Peilonrayz
    Commented Jun 19, 2021 at 19:21
  • @Peilonrayz Well then you aren’t using comments correctly according to the site’s guidelines, which I’ve quoted in my answer.
    – ColleenV
    Commented Jun 19, 2021 at 19:22
  • @ColleenV Each site can have their own site's guidelines.
    – Peilonrayz
    Commented Jun 19, 2021 at 19:23
  • 3
    @Peilonrayz As far as I know, every site on the network has the same documentation for the “comment anywhere” privilege. That most sites choose to ignore the ephemeral nature of comments strengthens my opinion that the system is flawed. Because we aren’t using the system as designed, everything that involves that system takes more effort than it should. Instead of adding more duct tape and baling wire, we should design the system we want.
    – ColleenV
    Commented Jun 20, 2021 at 12:50
  • 2
    @ColleenV The system isn't as flawed as you make out. A tunnel vision interpretation of rules is a flaw, rather than taking "ephemeral" as a guide line for most comments. Acknowledging sometimes finding and fixing a flaw in the current system is all that's needed. Not all comments need to be ephemeral, but silly discussions certainly should be. Regardless, following on from our discussion yesterday, I think the comment exchange we're currently in is not "really important", and so is breaking the rules.
    – Peilonrayz
    Commented Jun 20, 2021 at 13:01
  • @Peilonrayz You don’t understand my point. The problem is that comments are documented and supported as if they aren’t important, but most people behave as if they are. Every comment on SE could deleted tomorrow and I wouldn’t care that much. For some people that loss would be very discouraging. If we’re going to get upset that a comment was deleted accidentally, we need to start treating comments as important content that deserves full moderation and user interface support. The function comments provides is important. SE has outgrown the current implementation that provides that feature.
    – ColleenV
    Commented Jun 20, 2021 at 14:19
  • 1
    @Peilonrayz Our discussion isn’t counter to the design of comments as “temporary post-it notes” and I’m fine with it being deleted once it’s run its course.
    – ColleenV
    Commented Jun 20, 2021 at 14:24
  • @ColleenV are we sure that we want comments to stop being ephemeral by default. I don't want that. I reject that. I abhor that because that's the path towards making Q&A just another forum.
    – Braiam
    Commented Jun 21, 2021 at 20:07
  • @Braiam I think that most people don't want comments to be ephemeral. That's my basic complaint here--why are we acting like this is the comment system we want by continuing to duct tape another "fix" on to it? We deserve a better system. I knew before I posted this that I would not get a lot of support for it, because veteran users, and moderators in particular, are "living in the monkey house". Most of them can't smell the stench any more. We should stop pretending like comments are "temporary post-it notes".
    – ColleenV
    Commented Jun 21, 2021 at 20:19

Should moderators be able to undelete any comment?

Moderators should be able to undelete comments if there's a clear indication that doing so would be beneficial. What is the clear indication: an ongoing back and forth that hasn't resulted in some sort of conclusion about the post they are posted under (this specifically excludes meta sites)

If that conclusion comes in the form of an edit, closure, deletion, etc. then they don't need to undelete it.

Now, comments deleted by community flags or by the authors themselves... I don't see these as a problem that props up frequently. If we are going to do this, it should be within a specific timeframe, like less than 7 days old, to give time to participants to read the comment and do appropriated response. But otherwise, I don't see this as something moderators should be able to do.

Maybe we need information about how frequent this is and how it's being used. Someone with sick SQL skillz can shed light on this?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .