# Can custom emoticons support bulk deletion?

**URL:** https://meta.discourse.org/t/topic/364959
**Category:** Support
**Tags:** emoji
**Created:** [May 6, 2025, 8:42am UTC](https://meta.discourse.org/t/topic/364959 "2025-05-06T08:42:26Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 6, 2025, 2:01pm UTC](https://meta.discourse.org/t/topic/364959/2 "2025-05-06T14:01:30Z")

</div>

You can look at [Administrative Bulk Operations](https://meta.discourse.org/t/administrative-bulk-operations/118349).

Something like this would work

```plaintext
remove=Post.where("raw like '%:some_emoji%'")
remove.each do |post|
  new_raw=post.raw.gsub(":some_emoji","")
  if new_raw != post.raw
            PostRevisor.new(post).revise!(
              post.user,
              { raw: new_raw },
              bypass_bump: true,
              edit_reason: "Remove emoji we no longer like",
              bypass_rate_limiter: true,
            )
  end
end

```

You should test it, but it does create edits so you can undo it.

If you don’t want edits you could instead of `PostRevisor` do `post.raw=new_raw;post.save`.

---

_[View the full topic](https://meta.discourse.org/t/topic/364959)._
