AdminCP>Threads and Posts>Prune.

Set your options in there and that should do the trick though be careful doing this once done you can't go back so I would make a backup first in case something goes wrong.

JGM.