> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.elitehost.co.za/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How do I delete old emails in cPanel?

If your mailbox is full or you want to clean up older emails, you can do this easily using the **Email Disk Usage** tool in cPanel.

### Steps to delete old emails:

1. **Log in to cPanel**
* See: [How do I log into cPanel?](/en/article/how-do-i-log-into-cpanel-1wzhlku/)

2. **Navigate to "Email Disk Usage"**
* In the Email section, click on Email Disk Usage.

3. **Select the email account**
* Use the dropdown at the top to choose the account.

4. **Find the folder to manage**
* For example: INBOX, Sent, Trash, or any other folder.

5. **Click "Manage" next to the folder**
* This will open the cleanup options.

6. **Click the "Messages to delete" dropdown and choose one of the following options:**
   
* **1 year old or more** – Deletes emails older than one year
* **30 MB in size or more** - Deletes large messages
* **Previously viewed** - Deletes emails marked as read
* **All messages** - Deletes everything in the folder
* **Custom query …** - Use a search filter (see examples below)

7. **Click "Delete Permanently"**
   
* Confirm the deletion. This action cannot be undone.

||| Make sure you’ve backed up any important emails before deleting them.

### Custom query examples

When using the **Custom query** option, you can enter search filters in Dovecot’s query format.

Examples:

* `before 01-Jan-2025` - Deletes emails from before 1 January 2025
* `larger 10M` - Deletes emails larger than 10 MB
* `savedbefore 104weeks` - Deletes emails saved more than 2 years ago
* `savedbefore 26weeks` - Deletes emails saved more than 6 months ago
* `savedbefore 2weeks` - Deletes emails saved more than 2 weeks ago

Format/Tips:

* We recommend using the "before" filter with a specific date to remove older emails more accurately.
* Valid time units include: weeks, days and hours.
* Dates must be formatted as DD-MMM-YYYY (e.g. 01-Jan-2025).

If you need help with these steps, contact our [support team](https://my.elitehost.co.za/submitticket.php?step=2&deptid=14) or email helpdesk@elitehost.co.za.