# Mautic database is huge, can I manually delete old records?

**URL:** <https://forum.mautic.org/t/mautic-database-is-huge-can-i-manually-delete-old-records/22646>\
**Category:** Product Support\
**Created:** [February 9, 2022, 3:21pm UTC](https://forum.mautic.org/t/mautic-database-is-huge-can-i-manually-delete-old-records/22646 "2022-02-09T15:21:44Z")\
**Posts on this page:** 15\
**Page:** 2

<div class="post-metadata">

**Author:** ![miamiman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/miamiman/32/1118_2.png) [@miamiman](https://forum.mautic.org/u/miamiman)\
**Post date:** [January 4, 2023, 12:33pm UTC](https://forum.mautic.org/t/mautic-database-is-huge-can-i-manually-delete-old-records/22646/21 "2023-01-04T12:33:48Z")

</div>

Plugin page is still showing a 404?

[https://github.com/Leuchtfeuer/mautic-housekeeping-bundle](https://github.com/Leuchtfeuer/mautic-housekeeping-bundle)

Would you please advise?

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [January 4, 2023, 1:59pm UTC](https://forum.mautic.org/t/mautic-database-is-huge-can-i-manually-delete-old-records/22646/22 "2023-01-04T13:59:06Z")

</div>

It’s TechBill on GitHub

---

<div class="post-metadata">

**Author:** ![tobsowo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tobsowo/32/3096_2.png) [@tobsowo](https://forum.mautic.org/u/tobsowo)\
**Post date:** [January 9, 2023, 10:49am UTC](https://forum.mautic.org/t/mautic-database-is-huge-can-i-manually-delete-old-records/22646/23 "2023-01-09T10:49:01Z")

</div>

Hello Ekke,

Interested in this. @tobsowo is my GitHub handle.

---

<div class="post-metadata">

**Author:** ![ekke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ekke/32/296_2.png) [@ekke](https://forum.mautic.org/u/ekke)\
**Post date:** [February 1, 2023, 10:03am UTC](https://forum.mautic.org/t/mautic-database-is-huge-can-i-manually-delete-old-records/22646/24 "2023-02-01T10:03:08Z")

</div>

now public 🙂 @tobsowo @miamiman @techbill

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [February 1, 2023, 10:04am UTC](https://forum.mautic.org/t/mautic-database-is-huge-can-i-manually-delete-old-records/22646/25 "2023-02-01T10:04:24Z")

</div>

Oh yes. This is one fine plugin.

---

<div class="post-metadata">

**Author:** ![tobsowo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tobsowo/32/3096_2.png) [@tobsowo](https://forum.mautic.org/u/tobsowo)\
**Post date:** [February 1, 2023, 10:47am UTC](https://forum.mautic.org/t/mautic-database-is-huge-can-i-manually-delete-old-records/22646/26 "2023-02-01T10:47:22Z")

</div>

Thank you for this Ekke. Definitely going to use it

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [February 1, 2023, 3:10pm UTC](https://forum.mautic.org/t/mautic-database-is-huge-can-i-manually-delete-old-records/22646/27 "2023-02-01T15:10:03Z")

</div>

I am getting this error message trying to use plugin

```auto
In FileLoader.php line 208:

  Expected to find class "MauticPlugin\MauticHouskeepingBundle\Command\EventLogCleanupCommand" in file "/home/agwmadmin/mas.agwm.org/plugins/
  MauticHouskeepingBundle/Command/EventLogCleanupCommand.php" while importing services from resource "../../plugins/*/Command/*", but it was
  not found! Check the namespace prefix used with the resource.

```

The EventLogCleanupCommand.php is there in the folder where it supposed to be at.

Any idea what I am doing wrong?

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [February 1, 2023, 3:22pm UTC](https://forum.mautic.org/t/mautic-database-is-huge-can-i-manually-delete-old-records/22646/28 "2023-02-01T15:22:54Z")

</div>

I can’t get back on my Mautic after running the plugin …

 ![Screenshot 2023-02-01 at 9.22.44 AM](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/4/4c4c8215d06a916629f8c60ad5316741193205ce.jpeg)

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [February 1, 2023, 3:58pm UTC](https://forum.mautic.org/t/mautic-database-is-huge-can-i-manually-delete-old-records/22646/29 "2023-02-01T15:58:01Z")

</div>

Deleted the plugin and emptied cache restored my Mautic …

---

<div class="post-metadata">

**Author:** ![miamiman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/miamiman/32/1118_2.png) [@miamiman](https://forum.mautic.org/u/miamiman)\
**Post date:** [February 9, 2023, 6:43pm UTC](https://forum.mautic.org/t/mautic-database-is-huge-can-i-manually-delete-old-records/22646/30 "2023-02-09T18:43:21Z")

</div>

Just downloaded. Will install. Thank you!

---

<div class="post-metadata">

**Author:** ![notsotechy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/notsotechy/32/8095_2.png) [@notsotechy](https://forum.mautic.org/u/notsotechy)\
**Post date:** [July 14, 2023, 5:47pm UTC](https://forum.mautic.org/t/mautic-database-is-huge-can-i-manually-delete-old-records/22646/31 "2023-07-14T17:47:11Z")

</div>

I have a question regarding the email\_stats table,

is it safe to truncate this table?

I understand stats will be off/ not available, but is it going to break functionality in any way?

I care more about keeping the db small than to see stats from 1 year ago…

tnx!

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [July 15, 2023, 7:17am UTC](https://forum.mautic.org/t/mautic-database-is-huge-can-i-manually-delete-old-records/22646/32 "2023-07-15T07:17:18Z")

</div>

Hi, here is an article about the email\_stats table:

> **[The great Mautic weight control – Joey Keller](https://joeykeller.com/the-great-mautic-weight-control/)**

---

<div class="post-metadata">

**Author:** ![carlosatfongo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/carlosatfongo/32/10223_2.png) [@carlosatfongo](https://forum.mautic.org/u/carlosatfongo)\
**Post date:** [January 26, 2024, 6:47am UTC](https://forum.mautic.org/t/mautic-database-is-huge-can-i-manually-delete-old-records/22646/33 "2024-01-26T06:47:17Z")

</div>

Regarding the mautic:maintenance:cleanup command, this would also delete audit logs for known contacts too, no? Atleast, that’s what i see happening when using this command on a live instance.

---

<div class="post-metadata">

**Author:** ![steffenabel](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/steffenabel/32/9907_2.png) [@steffenabel](https://forum.mautic.org/u/steffenabel)\
**Post date:** [March 5, 2024, 10:40am UTC](https://forum.mautic.org/t/mautic-database-is-huge-can-i-manually-delete-old-records/22646/34 "2024-03-05T10:40:16Z")

</div>

Thank you for that, it was super helpful for me!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [March 6, 2024, 10:40pm UTC](https://forum.mautic.org/t/mautic-database-is-huge-can-i-manually-delete-old-records/22646/35 "2024-03-06T22:40:53Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.

[Previous page](https://forum.mautic.org/t/mautic-database-is-huge-can-i-manually-delete-old-records/22646.md?page=1)
