After cleaning up your mailbox by deleting old emails, emptying the Deleted Items folder, or archiving messages, you may notice that the Outlook OST file on your hard drive still shows the same size. The OST file is a local copy of your Exchange Online or Exchange Server mailbox, and Outlook does not automatically shrink it when you remove items. This article explains why the OST file stays large and shows you how to force it to shrink without resetting or recreating the file from scratch.
The OST file grows as Outlook caches your mailbox data locally. When you delete items from the server, Outlook marks those items as removed but does not immediately release the disk space they occupied. The file remains bloated until you use a specific mailbox cleanup command or compact the file manually. This guide covers the Mailbox Cleanup tool, the manual OST compaction process, and how to avoid common pitfalls that prevent the file from shrinking.
You will learn the exact steps to reduce the OST file size using built-in Outlook tools, verify the new size, and confirm that no data loss occurs. By the end, you can reclaim disk space without deleting and re-downloading your mailbox.
Key Takeaways: Shrinking the OST File After Mailbox Cleanup
- File > Account Settings > Account Settings > Change > More Settings > Advanced > Outlook Data File Settings > Compact Now: Runs the built-in OST compaction that releases unused space without requiring a full mailbox resync.
- Mailbox Cleanup > Empty Deleted Items Folder and Purge Recoverable Items: Removes hard-deleted items that still occupy space in the OST file even after emptying the Deleted Items folder from the interface.
- Check OST file size in File Explorer before and after compaction: Verifies that the shrink operation actually reduced the file on disk, confirming the cleanup was effective.
Why the OST File Stays Large After Deleting Emails
The OST file is a local cache that mirrors your Exchange mailbox. When Outlook syncs with the server, it downloads all mailbox data including emails, calendar items, contacts, and attachments. Deleting an item from the Outlook interface sends a delete command to the server, but the local OST file does not immediately reclaim the disk space. The file simply marks those data blocks as available for reuse. Over time, as you delete more items, the file becomes fragmented with free space that Outlook does not release automatically.
Outlook has a built-in compaction mechanism that runs periodically in the background, but it may not trigger often enough or may not run at all if the file is not large enough to meet the internal threshold. The default threshold is 20 percent free space within the file. If the unused space inside the OST file is less than 20 percent of the total file size, Outlook skips compaction. This means even after a major cleanup, the file may not shrink until you manually force the process.
Another reason the OST file stays large is the Recoverable Items folder. When you empty the Deleted Items folder, the items move to the Recoverable Items folder on the server. Outlook caches these items locally as well. Until you purge the Recoverable Items folder using the Mailbox Cleanup tool, those items continue to occupy space in the OST file. This is a common oversight that prevents the file from shrinking after a mailbox cleanup.
Steps to Compact the OST File Using Outlook’s Built-in Tool
Follow these steps to manually compact the OST file. This method does not delete any data and does not require you to close Outlook during the process.
- Open Account Settings
In Outlook, go to File > Account Settings > Account Settings. A dialog box opens showing all email accounts configured in your profile. - Select your Exchange account and click Change
Click once on the Exchange or Microsoft 365 account that uses the OST file you want to shrink. Then click the Change button above the list. - Open More Settings
In the Change Account dialog, click More Settings. A new dialog box with multiple tabs appears. - Go to the Advanced tab
Click the Advanced tab. Under the Mailbox Mode section, click the Outlook Data File Settings button. - Run the Compact Now command
In the Outlook Data File Settings dialog, click Compact Now. A progress bar appears. The compaction process may take several minutes depending on the file size and the amount of free space inside the file. Do not close Outlook during this step. - Verify the new OST file size
After compaction finishes, close all Outlook dialog boxes. Open File Explorer and navigate to the default OST file location:%localappdata%\Microsoft\Outlook. Right-click the OST file and select Properties. Compare the Size on disk value with the size before compaction. The file should be noticeably smaller.
How to Check the OST File Size Before Compaction
Before you start the compaction, note the current OST file size so you can measure the reduction. In Outlook, go to File > Account Settings > Account Settings, select your Exchange account, and click Change > More Settings > Advanced > Outlook Data File Settings. The dialog shows the current file path and the file size. Write down this size or take a screenshot. After compaction, check the same dialog or File Explorer to confirm the size decreased.
Clean the Recoverable Items Folder to Free More Space
If the OST file still appears large after compaction, the Recoverable Items folder likely holds deleted items that Outlook caches locally. Emptying this folder forces Outlook to remove those items from the OST file.
- Open Mailbox Cleanup
In Outlook, go to File > Info > Tools > Mailbox Cleanup. The Mailbox Cleanup dialog opens. - Empty Deleted Items
Click the Empty button under Empty Deleted Items. This removes all items from the Deleted Items folder. These items move to the Recoverable Items folder on the server. - Purge Recoverable Items
In the same Mailbox Cleanup dialog, click Empty under Empty Recoverable Items. A confirmation prompt asks if you are sure. Click Yes. This permanently deletes the items from the server and from the local OST cache. - Run Compact Now again
Repeat the compaction steps from the previous section. The OST file should shrink further after purging the recoverable items.
If Outlook Still Has Issues After the Main Fix
OST file size did not change at all after Compact Now
If the Compact Now button ran but the file size remained identical, the OST file may not have enough free space to trigger compaction. Outlook only compacts when the free space inside the file exceeds 20 percent of the total file size. If you deleted only a small number of items, the free space may be below this threshold. In this case, delete more items from your mailbox, empty the Deleted Items folder, and purge the Recoverable Items folder. Then run Compact Now again.
Outlook crashes or freezes during compaction
A corrupted OST file can cause Outlook to freeze or crash when you attempt compaction. Close Outlook and run the Inbox Repair Tool (ScanPST.exe). This tool is located in the Outlook installation folder, typically C:\Program Files\Microsoft Office\root\Office16. Run ScanPST.exe, browse to your OST file, and click Start. After the repair completes, reopen Outlook and try Compact Now again.
OST file is read-only and cannot be modified
If the OST file has the Read-only attribute set in File Explorer, Outlook cannot write changes during compaction. Right-click the OST file in File Explorer, select Properties, and uncheck Read-only under Attributes. Click Apply and OK. Then repeat the compaction steps.
Manual OST Compaction vs Automatic Compaction: Key Differences
| Item | Manual Compaction (Compact Now) | Automatic Compaction |
|---|---|---|
| Trigger | User clicks Compact Now in Account Settings | Outlook runs in the background when free space exceeds 20% |
| Control | Full control over when compaction happens | No user control; may not run after cleanup |
| Speed | Fast, typically completes in 2-5 minutes | Slower, runs during idle time |
| Data safety | No data loss; compacts in place | No data loss; compacts in place |
| Best for | Immediately after large mailbox cleanup | Regular maintenance without user intervention |
Now you can reduce the OST file size after any mailbox cleanup without resetting the file or re-downloading your entire mailbox. Use the Compact Now command and purge the Recoverable Items folder to reclaim the most disk space. For ongoing maintenance, check your OST file size monthly using File > Account Settings > Account Settings > Change > More Settings > Advanced > Outlook Data File Settings and run Compact Now if the file seems bloated. A compacted OST file also improves Outlook performance because the local cache is smaller and less fragmented.