Sometimes, you need a quick way to empty a mailbox or delete a mass check of emails.
Typically, the [system account] mailbox might also full up with junk and needs to be cleaned up to recover space on your hosting account.
cPanel has a feature which lets you clean up mail storage and if used carefully can be a quick and powerful way to recover storage space.
Follow these steps:
- Log in to your cPanel account
- In the Email section, click on Email Disk Usage

- From the drop-down, select the mailbox you want to recover disk space from:

- Click on Manage next to the folder in the mailbox you'd like to clean up:

- You will now see the Delete options:

- Select All messages to empty the entire folder. This is good for emptying your junk mail folder.
You can also use a custom query, but do this with care. (you may want to back up your mailbox first).
Read this link on how to create a query: https://doc.dovecot.org/main/core/man/doveadm-search-query.7.html - Once you have made your selection, click on the Delete Permanently button.
- A confirmation message will be displayed:
