It's so weird that there is no answer for such a easy question. Let me share a solution:
- Create a new filter, set the condition to
is before, and set a specific date.
- Set the filter action to
Delete Message. Save.
- Select the just-created filter, and select a folder at
Run selected filter on:. Click
Now you can delete more than 20000 emails in one click. Don't forget to delete the temporary filter after that.