# Mautic 5 database cleanup

**URL:** <https://forum.mautic.org/t/mautic-5-database-cleanup/31989>\
**Category:** Product Support\
**Created:** [May 7, 2024, 3:06am UTC](https://forum.mautic.org/t/mautic-5-database-cleanup/31989 "2024-05-07T03:06:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashish01](https://avatars.discourse-cdn.com/v4/letter/a/b38774/32.png) [@ashish01](https://forum.mautic.org/u/ashish01)\
**Post date:** [May 7, 2024, 3:06am UTC](https://forum.mautic.org/t/mautic-5-database-cleanup/31989/1 "2024-05-07T03:06:05Z")

</div>

**Your software**  
My Mautic version is: 7  
My PHP version is:8  
My Database type and version is:mysql

**Your problem**  
My problem is:  
I am using Mautic version 5 and want to clean up the database as my database grow up to 74 GB and out of which 50 GB is from email\_stats table so i want to know whats the best way to clean that up, i dont want to loose the top level stats that is how many i sent to a particular campaign/email, how many opens and how many clicked.  
Can you please suggest a way to do cleanup without loosing that data and reduce the database size?

---

<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:** [May 7, 2024, 5:09am UTC](https://forum.mautic.org/t/mautic-5-database-cleanup/31989/2 "2024-05-07T05:09:57Z")

</div>

Hi, use this plugin:

> **[Tutorial - Housekeeping Plugin for Mautic](https://leuchtfeuer.com/en/mautic/know-how/mautic/tutorial-housekeeping-plugin-for-mautic/)**
>
> With our housekeeping plugin for Mautic, you can easily keep your database lean. Which functions the plugin offers and how to use it sensibly is explained in this tutorial!

Or if you like to fiddle with the DB:

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