# Does the cronjob mautic:maintenance:cleanup --days-old=90 remove old identified contacts?

**URL:** <https://forum.mautic.org/t/does-the-cronjob-mauticcleanup-days-old-90-remove-old-identified-contacts/24499>\
**Category:** Product Support\
**Created:** [June 17, 2022, 10:07pm UTC](https://forum.mautic.org/t/does-the-cronjob-mauticcleanup-days-old-90-remove-old-identified-contacts/24499 "2022-06-17T22:07:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gnumax](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gnumax/32/7061_2.png) [@gnumax](https://forum.mautic.org/u/gnumax)\
**Post date:** [June 17, 2022, 10:07pm UTC](https://forum.mautic.org/t/does-the-cronjob-mauticcleanup-days-old-90-remove-old-identified-contacts/24499/1 "2022-06-17T22:07:29Z")

</div>

**Your software**  
My Mautic version is: 4.3.1  
My PHP version is: 7.4  
My Database type and version is: MariaDB: 10.3.32

Hi support,

Checking Mautic cronjobs I notice the following:

`/opt/alt/php74/usr/bin/php /home/<account>/public_html/bin/console mautic:maintenance:cleanup --days-old=90 --dry-run`

This command adds `--dry -ru`n at the end, which does not actually execute the action of the command but reports the affected records to be deleted after 90 days (or the set number of days, by default 365 days):

```auto
+------------------------------------+---------------------+
| Type of record | Registers concerned |
+------------------------------------+---------------------+
| Audit log entries | 3425094 |
| UTM Tag History | 67162 |
| User notifications | 6 |
| User tokens | 1 |
| Visitors | 829305 |
| Page views | 1380356 |
+------------------------------------+---------------------+

```

If I run this cronjob without `--dry-run` from terminal:

`/opt/alt/php74/usr/bin/php /home/<account>/public_html/bin/console mautic:maintenance:cleanup --days-old=90`

It informs me that this action will delete all data (records) after 90 days:

> This will permanently delete the oldest 90 data! Please make a backup before proceeding. Run this command with --dry-run to get an approximate list of records to be deleted. Continue? (y/n) n

The question is:

**Will this action (without --dry-run) remove all identified contacts, with email, older than 90 days (or the days set in the cronjob command) or only anonymous visitors?**

What is the point of recommending --dry-run by default in the mautic:maintenance:cleanup cron if it is not run with this parameter interposed?

I would like to know what happens to the identified contacts after the specified days.

I look forward to hearing from you, thank you! 🤗

---

<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:** [June 18, 2022, 5:43am UTC](https://forum.mautic.org/t/does-the-cronjob-mauticcleanup-days-old-90-remove-old-identified-contacts/24499/2 "2022-06-18T05:43:12Z")

</div>

Hi  
It doesnt remove known contacts at all. Also doesnt remove unidentified contacts. It cleans operational data.

Dry run will show you what would be deleted.

---

<div class="post-metadata">

**Author:** ![gnumax](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gnumax/32/7061_2.png) [@gnumax](https://forum.mautic.org/u/gnumax)\
**Post date:** [June 18, 2022, 4:13pm UTC](https://forum.mautic.org/t/does-the-cronjob-mauticcleanup-days-old-90-remove-old-identified-contacts/24499/3 "2022-06-18T16:13:14Z")

</div>

So what specific data does the `mautic:maintenance:cleanup --days-old=XXdays` cron run remove?

What is the **operational data**?

Thank you very much @joeyk 🤗

---

<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:** [June 18, 2022, 7:29pm UTC](https://forum.mautic.org/t/does-the-cronjob-mauticcleanup-days-old-90-remove-old-identified-contacts/24499/4 "2022-06-18T19:29:55Z")

</div>

> [@gnumax](#):
>
> ```auto
> log entries | 3425094 |
> | UTM Tag History | 67162 |
> | User notifications | 6 |
> | User tokens | 1 |
> | Visitors | 829305 |
> | Page views
> 
> ```

Okay, im stupid. It does remove anonyms as well. Just see your table above

---

<div class="post-metadata">

**Author:** ![gnumax](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gnumax/32/7061_2.png) [@gnumax](https://forum.mautic.org/u/gnumax)\
**Post date:** [June 18, 2022, 10:13pm UTC](https://forum.mautic.org/t/does-the-cronjob-mauticcleanup-days-old-90-remove-old-identified-contacts/24499/5 "2022-06-18T22:13:39Z")

</div>

Hi @joeyk

Thank you very much, I solve the “out of memory” problem after upgrading to 4.3.1 and try the cron without the `--dry-run` to see how it works.

`PHP Fatal error: Out of memory (allocated 191889408) (tried to allocate 327680 bytes) in /home/<account>/public_html/vendor/symfony/translation/MessageCatalogue.php on line 88`

Thanks for your constant support. 🤗
