How do I delete old emails in bulk?

September 12, 2017     0 comments

The instructions below are designed to help you delete old emails in bulk via cPanel or Webmail. This can be useful in certain occasions where you would like to remove emails en-masse based on some kind of variables – for instance if you want to delete all emails from a particular sender, or all emails you received before a particular point in time.

1. Login your cPanel, under the Mail heading, click Email Disk Usage.

2. On Account, choose the specific email account you’d like to clean up.

3. On the next screen you will see a listing of the different mailboxes for the email account you selected. For example, you will be able to see your Inbox, Sent Items, Junk Mail etc. The number of emails in each of these mailboxes as well as the disk usage for each will be shown.

  • Click Manage on the far right next to the mailbox you’d like to clean up. In this example shown below we’ll be cleaning up the Inbox.
  • Over on the left click Messages to delete.
  • You will be presented with various default options, in this example we’ll select 1 year old or more – this will delete all messages 1 year old & beyond from the Inbox.
  • Once you are certain that you wish to proceed with this action - click Delete Permanently.

Advanced Options / Custom Query
It’s possible to perform deletions based on specific values rather than using the default options that are shown in the Messages to delete menu. This is achieved by using the Custom query option.

1. Follow the same steps as defined earlier in this guide until you see the Messages to delete drop down menu – then click Custom query.
2. A new box will appear with the text Dovecot query. You can enter different values into this box to perform deletions based on a range of variables. Once you are ready to proceed – click Delete Permanently.

Some example queries are listed below. These can be modified to your specific requirements:

Delete all emails received before the 12th of March 2017.

savedbefore 12-Mar-2017
Delete all emails received on the 10th of April 2017.
savedon 10-Apr-2017
Delete all emails received since 15th of November 2017.
savedsince 15-Nov-2017
Delete all emails sent before 12th of February 2017.
sendbefore 12-Feb-2017
Delete all emails sent on 21st of September 2017.
senton 21-Sep-2017
Delete all emails since on 12th of December 2017.
sentsince 12-Dec-2017
Delete all emails from someone@somedomain.com
from someone@somedomain.com
Delete all emails to someone@somedomain.com
to someone@somedomain.com
Delete all emails with the subject "SPAM-thing-here" (without quotes)
subject SPAM-thing-here


We strongly advise exercising due care when deleting emails.

If you do not have administrative access to cPanel, deleting old emails in bulk is possible on your Webmail > Pie chart on the top right


How helpful was this article to you?

Leave a comment

Your name
Your email address
Comment on this article