As far as I know there isn't a simple switch that would accomplish this. But you can certainly write a script that you set up as a cron task that connects to your mailbox and deletes all email.
Relevant clipped bits from a python script I use to access an IMAP mailbox dedicated to receiving bounced messages:
# connect to mailbox.
ctx = ssl.create_default_context()
server = imaplib.IMAP4_SSL(host=imaphost, ssl_context=ctx)
# choose which messages you want.
resp, items = server.search(None, "ALL")
# get all the message ids.
items = items.split()
for i in items:
# Mark for deletion (sets the IMAP delete flag on the message).
server.store(i, '+FLAGS', '\\Deleted')
# Physically remove the messages.
Hope that helps get you started,