How cleanup old records in db

Please don’t post the same question multiple times.
You’ve already asked hit here. be patient