Sometimes it happens that I remember to cleanup my Quassel database because it is growing a lot even if there are chat logs I don’t care anymore.
Anyway, this technique is a little bit extreme because this way you will completely remove any chat-log (both private and public) that occurred before a given date.
If you are using Quassel with sqlite3 database then let me redirect you to a script that’s hosted on a page in my website.
If, instead, you are using Quassel with a postgres backend, then the command to issue is just this one:
psql -U <your_quassel_db_user> -W -d <your_quassel_db> -c "DELETE FROM backlog WHERE time < (SELECT CURRENT_DATE - INTERVAL '120 day');"
The above command will remove any log in the database leaving untouched just those that are not older than 120 days. You can change the interval value by putting anything you want there. I usually feel comfortable having the last 4 months available, just in case.
However, if you are running a multi-identities quasselcore (and, of course, you have access to the database) than you really should refine that query by adding a restriction on the identity you are using or, in a more general sense, the one that you are aiming to cleanup.