Delete Old Stats

Does anyone know of an easy way to delete all /home/<user>/var/<domain>/stats for ALL users back to a certain date? Is there an easy way to do this? I’ve been trying to figure out how the storage used keeps getting exponentially bigger with quotas set in place, only to realize that these files (stats and /var/mail) don’t count towards user quota and can therefore grow well above the size the user’s quota is set to. How do you guys deal with this? Is there an easy fix?
Running out of space on my HDD and need to clear up some room, easily server-wide for all users!


I’m also interested in this.

Any ideas?


What about something like this:

find /path/to/files* -mtime +180 -exec rm -rf {} \;


I’ve been running this command to delete the old stats files (not folders) that are older than a year:

 find /home/*/var/*/stats/* -mtime +365 -exec rm {} \;


Problem with that is some of the stats are folder based, that’s why I added the “-rf” option to delete the folders as well.