Problem removing data from Matomo

Hello,

We seem to have some corrupted data in our Matomo database. When we try to view the behavior reports in Matomo and including the first month when we started using Matomo it seems to be a memory leak and php running out of memory. It works when we are excluding that month.

We have been trying to remove that first month using https://matomo.org/faq/how-to/faq_20184/ I have also invalidated the reports using https://matomo.org/faq/how-to/faq_155/ but the data is still available. I’m not sure if a misunderstand something about witch data that are being deleted.

Any tips on how to solve this and why the data is not being removed?

I think that if you invalidate the reports data but also delete old raw data, Matomo won’t be able to re-archive the reports… Then the old reports will still be available (as their data are not deleted)…

Have a look there:
https://matomo.org/faq/how-to/how-do-i-delete-rows-of-a-report-and-specific-visits-to-clean-up-some-of-the-reporting-data/

And there:
https://matomo.org/faq/how-to/faq_73/

But if i invalidate the report data also it should be completely deleted right?
Let’s say i started using Matomo dec 1 2021 and i want to remove all tracking from dec 2021. I invalidate the report between 1 dec - 31 dec 2021 then i delete the raw data for the same period also. Now I want to create a report from the Matomo ui and I should not be able to see data from dec and not be able to even select it in the picker? The problem is that the data is still available there.

No.

  1. Delete raw data of December.
  2. Delete archived data (= data used in the reports) of December

If you invalidate the data, Matomo will just consider the data are not up-to-date. It is just a flag to tell Matomo that the next time it must archive data (= build reports).

Okay thanks, that seems to be working. But december (or whatever month it is) is still selectable in the the date picker in the UI for the reports. Maybe there is som other parameter that decides that date like when the site was created or something. Do you know if it is possible to make dec not selectable when there is no data? So it only becomes possible to select from jan 1 and forward.

Maybe directly in the database…
https://developer.matomo.org/guides/database-schema

I will have a look and try. Thanks so much for the help!