Bulk Deleting Email in Exchange Online and Gmail


This article describes how to bulk delete email in both Exchange Online and Gmail. If you have 10s of thousands of messages, the purging operation will likely time out after running for a while. Therefore, you may have to repeat the procedure until all emails are deleted.



Exchange Online

For a generic date range 

  1. In the Outlook Web Application (OWA), go to the Settings gear at top right.
  2. Click General in left navigation pane.
  3. Click Storage in middle navigation pane. You'll see all your folders sorted by size and message count.
  4. Select a folder you'd like to purge, and chose the date range: All or 3/6/12 months and older.

For a specific date range

  1. In the Outlook Web Application's search bar, type the query 'Received:<1/1/2024' where the date is the newest date that you want returned in the search.
    1. You can use the same query in the desktop application. 
  2. Scroll down to the end of the list to ensure all emails are loaded.
  3. Click Delete All.
  4. Click ok.


  1. In the search bar, type the query 'older_than:1y' where “1y” is a period that suits your needs.
    1. “y” is years
    2. “m” is months
    3. “d” is days
  2. Select all the messages using the checkbox in the toolbar.
  3. You will see, “All 50 conversations on this page are selected. Select all conversations that match this search” above the selected messages in a gray text box. The number “50” can be different depending on your settings.
  4. Click on the Select all conversations that match this search link.
  5. Click the trash icon.
  6. Click ok.