outlook Code OST Corruption Error

How to Fix Outlook OST Corruption Error

Diagnostic Procedures

  • 1 Understand the cause of Outlook OST corruption
  • 2 Locate the OST file on Windows and macOS
  • 3 Rebuild the OST file by deleting the cache
  • 4 Increase maximum OST file size via Registry
  • 5 Reset caches and profiles on macOS
  • 6 Summary checklist for OST corruption

How to Fix Outlook OST Corruption Error

When starting Microsoft Outlook, you may receive error messages such as:

  • “Cannot open your default e-mail folders. The file C:\Users…\AppData\Local\Microsoft\Outlook\username.ost is not an Outlook data file (.ost).”
  • “Outlook cannot open the data file.”
  • “Errors have been detected in the file…”

These errors indicate that the Offline Outlook Data File (.ost) has become corrupted. Because OST files are local caches of emails stored on server-side databases (Exchange, Microsoft 365, or IMAP), they can be safely recreated without losing server data.


1. What Causes Outlook OST Corruption?

OST file structure integrity can degrade due to:

  • Abrupt Shutdowns: Force-closing Outlook, system crashes, or power failures while Outlook is writing to the database.
  • File Size Limit Reached: The OST file has reached its maximum default storage capacity (typically 50 GB for Office 2016 and newer), triggering synchronization write locks and database page corruption.
  • Network Sync Interruptions: High latency or dropped packets during active folder sync processes.
  • Antivirus Interception: Real-time scanning utilities locking file headers while Outlook updates indexing tables.

2. Locate the OST File on Windows and macOS

Knowing where your database files are stored allows for direct backup and management.

Windows Default Paths

The default location is within the local user application data container:

  • C:\Users\<username>\AppData\Local\Microsoft\Outlook

macOS Default Paths

Outlook for Mac stores its data structures in a hidden system container:

  • ~/Library/Group Containers/UBF8T346G9.Office/Outlook/Outlook 15 Profiles

3. Rebuild the OST File by Deleting the Cache

Since the OST is an offline copy, the safest and most effective solution is to rename or delete the corrupted file and let Outlook rebuild a clean copy from the server database.

Step 1: Terminate all Microsoft Office Processes

Close Outlook and execute this Command Prompt script to ensure all lock interfaces are released:

taskkill /f /im outlook.exe
taskkill /f /im winword.exe

Step 2: Access the Cache Directory and Rename the OST File

Run these commands to navigate to the Outlook data folder and rename the corrupted .ost file:

cd /d %localappdata%\Microsoft\Outlook
ren *.ost *.ost.old

Step 3: Relaunch Outlook

Open Outlook. The program will recognize that the local .ost file is missing, open a secure handshake with the mail server, and begin downloading a fresh copy of your mailbox folders.


4. Increase Maximum OST File Size via Registry

If your OST file reached the 50 GB threshold, it will immediately corrupt again upon sync. Use the Windows Registry to increase the maximum database limit to 100 GB.

Open Command Prompt as Administrator and execute the following commands:

reg add "HKCU\Software\Microsoft\Office\16.0\Outlook\PST" /v MaxLargeFileSize /t REG_DWORD /d 102400 /f
reg add "HKCU\Software\Microsoft\Office\16.0\Outlook\PST" /v WarnLargeFileSize /t REG_DWORD /d 97280 /f

[!TIP] The values above increase the file size threshold to 100 GB (102,400 MB) and the warning limit to 95 GB (97,280 MB), allowing Outlook to resume syncing large mailboxes.


5. Reset Caches and Profiles on macOS

On macOS, Outlook uses SQLite databases inside profile containers instead of a single .ost file.

Step 1: Force Close Outlook processes

Run the following Terminal script to ensure all database log writers are stopped:

killall "Microsoft Outlook" 2>/dev/null
killall "Microsoft Outlook Finder Integration" 2>/dev/null

Step 2: Empty Folder Cache in Outlook

If only specific folders fail to sync:

  1. Open Outlook, right-click the corrupted folder (e.g. Inbox), and select Properties (or Folder Properties).
  2. Go to the General tab and click Empty Cache.
  3. Outlook will download the folder data again.

Step 3: Run Outlook Profile Manager

If the database remains corrupted, recreate the profile:

  1. Open Terminal and run the following command to launch the Profile Manager:
open -a "/Applications/Microsoft Outlook.app/Contents/SharedSupport/Outlook Profile Manager.app"
  1. Click the Plus (+) button to create a new profile.
  2. Select the new profile, click the Gear icon, and select Set as Default.
  3. Restart Outlook to recreate your local cache.

6. Summary Diagnostics Checklist

Diagnostics StepAction / PathExpected Outcome
Kill Lock HandlesRun taskkill /f /im outlook.exeReleases the file lock on the .ost database.
Rename OST FileRename .ost extension to .ost.oldForces Outlook to download a clean, non-corrupt database cache.
Increase Database LimitRun Registry MaxLargeFileSize commandsPrevents 50 GB size limit corruption triggers.
Empty Cache (Mac)Folder Properties -> General -> Empty CacheRebuilds specific SQLite folder files on macOS.
Recreate Profile (Mac)Run Outlook Profile Manager and set a new defaultRe-indexes all macOS message structures.