# How to truncate bounced email log

**URL:** https://meta.discourse.org/t/how-to-truncate-bounced-email-log/194262
**Category:** Support
**Created:** [June 18, 2021, 6:45am UTC](https://meta.discourse.org/t/how-to-truncate-bounced-email-log/194262 "2021-06-18T06:45:28Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Andro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andro/32/173721_2.png) [@Andro](https://meta.discourse.org/u/Andro)
#### Post date: [June 18, 2021, 6:45am UTC](https://meta.discourse.org/t/how-to-truncate-bounced-email-log/194262/1 "2021-06-18T06:45:28Z")

</div>

How can I truncate the bounced email log? I don’t need to keep these entries forever.

---

<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: [June 18, 2021, 10:54am UTC](https://meta.discourse.org/t/how-to-truncate-bounced-email-log/194262/2 "2021-06-18T10:54:38Z")

</div>

They don’t take up much space so they aren’t trimmed automatically (or so I think) . You could delete them from the rails console. You might see [Administrative Bulk Operations](https://meta.discourse.org/t/administrative-bulk-operations/118349) for some hints.

---

<div class="post-metadata">

### Author: ![Andro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andro/32/173721_2.png) [@Andro](https://meta.discourse.org/u/Andro)
#### Post date: [June 18, 2021, 11:45am UTC](https://meta.discourse.org/t/how-to-truncate-bounced-email-log/194262/3 "2021-06-18T11:45:37Z")

</div>

Thank you, but I could not see anything I could adapt on that page. And I know nothing about rails.

A pity, because I really don’t want to see all the old entries. It’s not disk space I am concerned about. It’s the visual noise. I want tio delete them so I can readily see if new bounces are occurring.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [February 17, 2022, 10:21am UTC](https://meta.discourse.org/t/how-to-truncate-bounced-email-log/194262/4 "2022-02-17T10:21:08Z")

</div>

I’ve just been cleaning my test site down, and came across this topic in my research. I cleaned out my email logs using the rails console (I am a novice though, so bear that in mind).

Would this be suitable for this case?

```plaintext
EmailLog.where(bounced=true).destroy_all

```
