Thunderbird: How to delete email before specific range

It's so weird that there is no answer for such a easy question. Let me share a solution:

  1. Create a new filter, set the condition to Date, is before, and set a specific date.
  2. Set the filter action to Delete Message. Save.
  3. Select the just-created filter, and select a folder at Run selected filter on:. Click Run Now.

Now you can delete more than 20000 emails in one click. Don't forget to delete the temporary filter after that.