Delete old events


I use Nextcloud in a family context and for an association. I would like to know if there is a command line or a method to be able to proceed to the deletion of past events of X days for example?

Thank you very much for your sharing of experiences.