How to automatically empty delete items on close/exit in Outlook?
When you delete an email message in Microsoft Outlook, that message is first moved to the Deleted Items folder instead of being permanently erased. While this design helps you recover accidentally deleted messages, the Deleted Items folder can quickly accumulate messages and attachments, consuming mailbox space and potentially affecting Outlook’s performance. Regularly emptying the Deleted Items folder is essential for keeping your mailbox organized and preventing it from becoming oversized. However, doing this task manually each time can be inconvenient, especially if you handle a large volume of emails daily. Below, we’ll explore several ways to configure Outlook to automatically empty Deleted Items on exit—helping you streamline your workflow, maintain mailbox hygiene, and minimize the hassle of manual clean-up. You’ll also find alternative approaches, such as using VBA code for greater customization.
Automatically empty delete items on close in Outlook
VBA: Automatically and permanently empty Deleted Items without exit prompt
Automatically empty delete items on close in Outlook
To automate the removal of deleted messages each time you exit Outlook, use the built-in option available in Outlook. This method is convenient for users who want a set-and-forget solution and fits scenarios where all accounts in your Outlook profile should be cleaned on exit.
Follow these steps to enable automatic emptying of Deleted Items on close:
- Click the File tab, then select Options from the menu.
- In the Outlook Options dialog box, click Advanced on the left sidebar.
- Scroll to the Outlook start and exit section and check the box for Empty Deleted Items folders when exiting Outlook.

- Click the OK button to save your changes and close the Options dialog.
With this option enabled, whenever you exit Microsoft Outlook, a dialog box appears to confirm whether you wish to permanently delete the items in your Deleted Items folder(s). Click Yes to proceed and empty the folder(s), or No to retain the deleted items for now.

This built-in method is effective for most personal and organizational Outlook setups, as it does not require any complex configuration or third-party tools. It is especially useful if you want to ensure that all Deleted Items across multiple accounts are emptied upon closing Outlook. However, there are a few details to take note of:
- This function applies to all email accounts: When this setting is active, it will automatically empty the Deleted Items folders of every email account in your Outlook profile. If you manage multiple email accounts and only wish to target one, this method may not be suitable.
- Subfolders will be deleted: Any subfolders within your Deleted Items folder will also be removed, not just the messages directly inside.
- Cannot set exceptions: This method does not allow for granular control, such as skipping certain Deleted Items folders or selectively preserving subfolders.
VBA: Automatically and permanently empty Deleted Items without exit prompt
For users who wish to bypass the confirmation dialog and fully automate the emptying of the Deleted Items folder, a VBA solution may be more appropriate. With VBA, you can customize the script to only affect certain accounts or folders, and permanently delete the contents without additional confirmation. This approach is especially suitable for advanced users, shared computers, or organizations with strict retention policies.
1. Open Outlook and select any folder (it is not necessary to select a specific email for this script). Press Alt + F11 to open the Microsoft Visual Basic for Applications editor.
2. In the VBA editor window, go to Insert > Module to create a new module. Copy and paste the following VBA code into the module window.
VBA code: Permanently empty all Deleted Items folders without confirmation dialog
Sub EmptyDeletedItemsSilently()
Dim store As Outlook.Store
Dim folder As Outlook.Folder
Dim i As Integer
On Error Resume Next
xTitleId = "KutoolsforOutlook"
For Each store In Outlook.Application.Session.Stores
Set folder = store.GetDefaultFolder(olFolderDeletedItems)
If Not folder Is Nothing Then
For i = folder.Items.Count To 1 Step -1
folder.Items(i).Delete
Next i
End If
Set folder = Nothing
Next store
MsgBox "All Deleted Items folders have been emptied without confirmation.", vbInformation, xTitleId
Set store = Nothing
End Sub 3. Press F5 or click the Run button to execute the code. The script will immediately and permanently clear all Deleted Items folders across all accounts configured in your Outlook profile without showing any confirmation dialog. A notification message box will appear afterward to confirm completion.
- Important: This operation is irreversible and does not move items to another location. Double-check the contents of your Deleted Items folders before running the macro. As an added precaution, consider making a backup or only using this approach for non-critical accounts.
Best Office Productivity Tools
Experience the all-new Kutools for Outlook with 100+ incredible features! Click to download now!
📧 Email Automation: Auto Reply (Available for POP and IMAP) / Schedule Send Emails / Auto CC/BCC by Rules When Sending Email / Auto Forward (Advanced Rules) / Auto Add Greeting / Automatically Split Multi-Recipient Emails into Individual Messages ...
📨 Email Management: Recall Emails / Block Scam Emails by Subjects and Others / Delete Duplicate Emails / Advanced Search / Consolidate Folders ...
📁 Attachments Pro: Batch Save / Batch Detach / Batch Compress / Auto Save / Auto Detach / Auto Compress ...
🌟 Interface Magic: 😊More Pretty and Cool Emojis / Remind you when important emails come / Minimize Outlook Instead of Closing ...
👍 One-click Wonders: Reply All with Attachments / Anti-Phishing Emails / 🕘Show Sender's Time Zone ...
👩🏼🤝👩🏻 Contacts & Calendar: Batch Add Contacts From Selected Emails / Split a Contact Group to Individual Groups / Remove Birthday Reminders ...
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!


🚀 One-Click Download — Get All Office Add-ins
Strongly Recommended: Kutools for Office (5-in-1)
One click to download five installers at once — Kutools for Excel, Outlook, Word, PowerPoint and Office Tab Pro. Click to download now!
- ✅ One-click convenience: Download all five setup packages in a single action.
- 🚀 Ready for any Office task: Install the add-ins you need, when you need them.
- 🧰 Included: Kutools for Excel / Kutools for Outlook / Kutools for Word / Office Tab Pro / Kutools for PowerPoint