Outlook OST File Grows After Deleting Large Attachments: Fix
🔍 WiseChecker

Outlook OST File Grows After Deleting Large Attachments: Fix

You deleted large attachments from Outlook messages expecting the OST file to shrink. Instead, the OST file size stays the same or grows. This happens because Outlook does not automatically reclaim space inside the OST file after removing data. This article explains why the OST file grows, provides a step-by-step method to compact it, and covers related issues such as sync failures and corrupted data files.

Key Takeaways: Shrinking an OST File After Deleting Attachments

  • File > Account Settings > Account Settings > Data Files > Settings > Compact Now: Triggers an immediate compaction of the OST file to reclaim unused space.
  • Mailbox Cleanup > Empty Deleted Items Folder: Clearing the Deleted Items folder before compacting ensures deleted attachment remnants are removed.
  • Disable Cached Exchange Mode temporarily and re-enable: Forces Outlook to rebuild the local OST file from the server, eliminating all unused space.

ADVERTISEMENT

Why the OST File Grows After Deleting Attachments

An OST file is a local copy of your Exchange Online or on-premises Exchange mailbox. When you delete an attachment from a message in Outlook, the message header and body remain in the OST file. The space previously occupied by the attachment data is marked as available for reuse, but the file itself does not shrink. The OST file behaves like a database: it reserves space internally and only releases it during a compaction operation. Compaction is not automatic. Without manual intervention, the OST file retains its inflated size even after you delete many large attachments.

Another factor is the way Outlook stores attachments. When you download an attachment to view it, Outlook caches a copy in a temporary folder and also retains a reference in the OST file. Deleting the attachment from the message removes the reference but not the cached space inside the database. Over time, repeated attachment deletions and additions fragment the internal storage, causing the OST file to grow beyond the actual mailbox data size. The only way to release this space is to compact the OST file or rebuild it entirely.

Steps to Compact the OST File and Reclaim Disk Space

  1. Delete the attachments and empty Deleted Items
    Open the messages containing large attachments. Delete the attachments by right-clicking the attachment and selecting Remove Attachment. Confirm the removal. Go to the Deleted Items folder, select all items, and press Shift+Delete to permanently delete them. This step ensures no attachment remnants remain in the OST file before compaction.
  2. Open Account Settings
    In Outlook, select File > Account Settings > Account Settings. In the Account Settings dialog, select your Exchange account from the list. Click Change.
  3. Access the data file settings
    In the Change Account dialog, click More Settings. Switch to the Advanced tab. Under Offline Settings, click Outlook Data File Settings. This opens the Outlook Data File dialog for the OST file.
  4. Compact the OST file
    In the Outlook Data File dialog, click Compact Now. Outlook begins compacting the OST file. The process can take several minutes for large files. A progress bar appears. Do not close Outlook during compaction. When completed, the dialog shows the new file size. Click OK to close all dialogs.
  5. Verify the new file size
    Open File Explorer and navigate to the OST file location. The default path is %localappdata%\Microsoft\Outlook. Right-click the OST file and select Properties. Compare the size on disk with the size before compaction. A successful compaction reduces the file size significantly.

Alternative Method: Rebuild the OST File by Disabling Cached Exchange Mode

If compaction does not reduce the file size enough, you can force Outlook to create a fresh OST file from the server. This method deletes the existing OST file and downloads a new copy.

  1. Disable Cached Exchange Mode
    In Outlook, select File > Account Settings > Account Settings. Select your Exchange account and click Change. Uncheck the box labeled Use Cached Exchange Mode. Click Next and then Finish. Outlook restarts and connects directly to the server without a local OST file.
  2. Delete the old OST file
    Close Outlook. Open File Explorer and navigate to %localappdata%\Microsoft\Outlook. Locate the OST file for your account. The file name matches your email address or the mailbox name. Right-click the OST file and select Delete. Empty the Recycle Bin.
  3. Re-enable Cached Exchange Mode
    Open Outlook. Select File > Account Settings > Account Settings. Select your Exchange account and click Change. Check the box labeled Use Cached Exchange Mode. Select the desired slider for mail to keep offline. Click Next and then Finish. Outlook creates a new OST file and downloads all mailbox data from the server. The new file contains only the current mailbox content, eliminating all unused space.

ADVERTISEMENT

If Compaction or Rebuild Fails

Outlook shows an error during compaction

If Outlook displays an error such as “Cannot compact this file” or “The operation failed,” the OST file may be corrupted. Run the Inbox Repair Tool (Scanpst.exe) on the OST file. Close Outlook. Navigate to C:\Program Files (x86)\Microsoft Office\root\Office16 or the equivalent path for your Office version. Double-click Scanpst.exe. Browse to the OST file and click Start. The tool scans and repairs errors. After repair, attempt compaction again.

OST file size grows again quickly after compaction

If the OST file inflates again within days, check whether Outlook is set to download shared mailboxes or public folders. Go to File > Account Settings > Account Settings. Select your Exchange account and click Change > More Settings > Advanced. Under Public Folders, uncheck Download Public Folder Favorites. Under Mailboxes, remove any shared mailboxes that are not needed offline. Reduce the Mail to keep offline slider to a lower value, such as 1 month or 3 months. This limits the amount of data stored locally.

OST file does not appear after rebuild

If the new OST file does not appear after re-enabling Cached Exchange Mode, check that the profile points to the correct data file. Go to File > Account Settings > Account Settings > Data Files. Ensure the OST file listed is set as default. If the path is missing, click Add and select the new OST file from the %localappdata%\Microsoft\Outlook folder. Restart Outlook.

Compaction vs Rebuild: When to Use Each Method

Item Compaction Rebuild (Disable/Re-enable CEM)
Time required Minutes to an hour Hours for large mailboxes
Data loss risk None None, server copy is preserved
Effectiveness Frees 10% to 30% of OST space Frees up to 100% of unused space
Corruption repair Does not repair corruption Creates a fresh file, bypasses corruption
Network usage None Downloads entire mailbox again

The compaction method is faster and suitable when the OST file is not corrupted and you want to reclaim a moderate amount of space. The rebuild method is more thorough and is the preferred choice when the OST file is severely bloated or corrupted.

ADVERTISEMENT

Conclusion

You can now compact your OST file using the Compact Now button in Outlook data file settings or rebuild it by toggling Cached Exchange Mode. Both methods reclaim disk space after deleting large attachments. For ongoing management, reduce the mail kept offline and avoid downloading shared mailboxes locally. Use the Inbox Repair Tool if compaction fails due to file corruption.

ADVERTISEMENT