If your Outlook window hangs for several seconds when you try to close it, a large data file is often the cause. Outlook must finalize changes and write data to its local storage file before it can shut down. This article explains why this delay happens and provides the steps to compact your Outlook data file to reduce its size and improve close times.
Key Takeaways: Fixing Slow Outlook Closure
- File > Account Settings > Account Settings > Data Files: Opens the list of Outlook Data Files where you can view file size and access the compact tool.
- Settings > Compact Now: The direct command to reduce the physical size of your Outlook data file by removing empty space.
- Archiving old items: Moving older emails to a separate archive file is the most effective way to keep your primary data file small and fast.
Why a Large Data File Slows Down Outlook Closure
Outlook stores all your emails, calendar events, contacts, and tasks in a single local file, typically named Outlook.pst or Outlook.ost. Every time you close Outlook, it performs a final synchronization and data write to this file. The larger this file grows, the longer these final operations take, resulting in the noticeable delay.
The file size increases as you receive and send more messages. Even when you delete items, Outlook often just marks the space as available for reuse instead of immediately shrinking the file. This process leaves behind unused, blank space within the file structure. Compacting the database removes this wasted space, reducing the file’s physical size on your disk and speeding up read/write operations during shutdown.
Steps to Compact Your Outlook Data File
Follow these steps to manually compact your primary Outlook data file. Ensure Outlook is running normally and you have a few minutes for the process to complete.
- Open Account Settings
In Outlook, click the File tab on the ribbon. In the Account Information screen, click the Account Settings button, then select Account Settings again from the dropdown menu. - Select Your Data File
In the Account Settings window, go to the Data Files tab. This lists all data files associated with your profile. Click to select your primary data file, usually named “Outlook Data File.” Note the file path and current size displayed. - Open Folder Location and Close Outlook
Click the Open File Location button above the list. This opens File Explorer to the folder containing your data file. Close the Account Settings window, then completely close Outlook. You must exit Outlook for the next step to work. - Run the Inbox Repair Tool
In the File Explorer window, navigate one folder level up. Press the Windows key, type “SCANPST.EXE”, and press Enter to run the Microsoft Outlook Inbox Repair Tool. Click Browse to locate and select your Outlook.pst file, then click Start. If errors are found, click Repair. This tool fixes corruption and prepares the file for compacting. - Compact the File within Outlook
Restart Outlook. Go back to File > Account Settings > Account Settings > Data Files. Select your data file again and click the Settings button. In the new window, click the Compact Now button. A progress bar will appear. Do not use Outlook until the process finishes.
Using AutoArchive to Prevent Large Files
For a long-term solution, configure AutoArchive to move old items out of your main file automatically. Go to File > Options > Advanced. Under AutoArchive, click AutoArchive Settings. Check “Run AutoArchive every” and set a number of days. Choose a location for your archive file and set rules for deleting or moving old items. This prevents your primary file from growing too large again.
If Compacting Does Not Solve the Slow Close
Outlook Still Hangs on Exit After Compacting
If the delay persists, add-ins may be causing the issue. Start Outlook in safe mode by pressing Windows Key + R, typing “outlook /safe”, and pressing Enter. If Outlook closes quickly in safe mode, an add-in is the culprit. Disable add-ins one by one via File > Options > Add-ins. At the bottom, select COM Add-ins and click Go. Uncheck add-ins to find the problematic one.
Error Message Appears During Compacting
If you receive an error that the file is in use, ensure all Outlook windows are closed in the Task Manager. Also, disable any third-party antivirus or backup software that might be locking the file temporarily. Run the Inbox Repair Tool (SCANPST.EXE) as an administrator for better file access.
File Size Does Not Reduce Significantly
Compacting only removes space from items you have already deleted. If your file remains large because you have many thousands of active items, you must archive or delete them manually. Create a new PST file via File > Open & Export > Import/Export > Export to a file, and move older folders to it.
Manual Compaction vs. AutoArchive: Key Differences
| Item | Compact Now | AutoArchive |
|---|---|---|
| Primary Action | Shrinks file size by removing blank space from deleted items | Moves old items to a separate archive file based on age |
| Effect on Data | Keeps all data in the primary file, just optimizes storage | Physically relocates data out of the main file |
| Best For | Fixing slow performance and closure delays after mass deletions | Proactive maintenance to prevent the main file from growing too large |
| Automation | Manual process initiated by the user | Can be scheduled to run automatically at set intervals |
| File Count | Works on a single selected data file | Creates and manages a second archive data file |
You can now compact your Outlook data file to fix slow shutdown times. Regularly archiving old emails will keep your primary file manageable. For advanced control, use the Windows Task Scheduler to run the SCANPST.EXE tool monthly before a full compaction.