Stop Doing This — Try Compact Outlook Data File Instead

You’re about to send a critical client proposal. Outlook freezes for 8 seconds when you click Send. Then it crashes. You restart — and notice your mailbox folder takes 12 seconds to expand. That’s not lag. That’s a bloated data file screaming for attention.

The Problem

Outlook stores emails, attachments, calendar entries, and contacts in local files: .pst (for POP/IMAP accounts or archive files) and .ost (for Exchange/Office 365 cached mode). Over time, these files don’t shrink when you delete items. They just mark space as ‘available’ — like deleting a photo from your phone but not emptying the trash. That unused space piles up. A 4 GB PST can easily swell to 7 GB on disk while showing only 3.2 GB in Outlook’s folder size display. It hits everyone who uses Outlook desktop regularly — especially admins managing shared mailboxes, finance teams with years of invoice PDFs, or anyone who archives manually instead of using AutoArchive. The symptoms are unmistakable: slow startup, sluggish search, frequent hangs when switching folders, and occasional 'Outlook cannot open this file' errors. Worse — compaction doesn’t happen automatically. Microsoft removed auto-compaction after Outlook 2003. And no, Outlook Web App (OWA) doesn’t have this feature at all. It’s desktop-only.

The Fix

Compacting rebuilds the file from scratch — removing gaps, reorganizing blocks, and trimming dead space. Here’s how to do it *exactly*, version by version. First, close all other Outlook windows. You can’t compact a file that’s actively in use. Then go to File > Account Settings > Account Settings…. In the Account Settings window, click the Data Files tab. Select your main data file — usually named something like Outlook.pst or archive.pst, not the .ost file (more on that later). Click Settings…. In the new window, click Compact Now. That’s it. No confirmation dialog. No progress bar. Just silence — then a quick flash of the Outlook window as it rebuilds the file. For Outlook 365 and 2019, the button is always visible if the file is a .pst. For Outlook 2016, it’s there too — but only if you’re not in Cached Exchange Mode *and* the file isn’t set as your default delivery location for an Exchange account. If you see it grayed out, keep reading. Keyboard shortcut? There isn’t one built-in. But you *can* speed up access: press Alt+F, then A, then D, then Enter to jump straight to Data Files — then arrow down and Enter on Settings.

If That Doesn't Work

Grayed-out Compact Now? You’re not broken. Here’s what’s actually happening — and how to fix it:
  • You’re trying to compact an .ost file. OST files are offline caches. They rebuild themselves automatically when Outlook restarts in online mode — no manual compaction needed. Don’t waste time here.
  • Your PST is set as the default delivery location for an Exchange account. Go to File > Account Settings > Account Settings…, click the Email tab, double-click your Exchange account, and check Deliver new email to:. If it says your PST file, change it to your Exchange mailbox. Then try again.
  • The file is open elsewhere. Check Task Manager for hidden Outlook processes (OUTLOOK.EXE). End them all. Also verify no backup software (like Veeam or Acronis) has the file locked — they often hold read locks during scans.
  • You’re using a network-based PST. Outlook won’t let you compact files stored on OneDrive, SharePoint, or a mapped drive. Move it locally first: copy archive.pst to C:\Users\[you]\Documents\, then add it back via File > Open & Export > Open Outlook Data File….
One counterintuitive tip: If you’re on Outlook 365 and still stuck, try running Outlook in Safe Mode (Win+R, type outlook.exe /safe). Then repeat the steps. Add-ins sometimes block low-level file operations — even ones you didn’t know were running.

Preventing It Next Time

Compaction isn’t maintenance — it’s triage. Prevention means changing habits. First: stop using PSTs for active mail. If you’re on Exchange or Microsoft 365, let your mailbox stay online. Use Online Archive (if licensed) instead of local PSTs. It scales, searches faster, and never needs compacting. Second: if you must keep a PST, turn on AutoArchive — but configure it *right*. Go to File > Options > Advanced > AutoArchive Settings…. Set it to run every 14 days (not 1 day — too aggressive), and choose Delete old items or Move old items to archive.pst. Crucially: uncheck Run AutoArchive every X days on *every PST except your main archive file*. Otherwise, Outlook tries to archive *from* archive.pst *to* archive.pst — and corrupts it. Third: avoid saving huge attachments directly to email. Drag PDFs into OneDrive or SharePoint, then paste the link. Your PST will thank you. Mobile Outlook (iOS/Android) doesn’t use PST or OST files — so none of this applies. It syncs live with the server. No local file bloat. No compaction. Just make sure ‘Download full messages’ is off in Settings > Accounts > [your account] > Advanced — unless you need offline access to every attachment.

Related Settings

These settings interact directly with compaction behavior — and most people ignore them until things break.
Setting NameLocationOptionsRecommendation for your main data table
Mailbox CleanupRight-click mailbox > Properties > Folder SizeView size, Empty Deleted Items, Empty Junk EmailDo this monthly. Emptying Deleted Items frees space *before* compaction — cuts compact time by 40%.
PST EncryptionFile > Open & Export > Import/Export > Export to a file > Outlook Data File (.pst)None, Compressible, HighAvoid ‘High’ encryption — it prevents compaction entirely. Use ‘Compressible’ if you need password protection.
Cached Exchange ModeFile > Account Settings > Account Settings > Email tab > double-click account > ChangeAll, 12 months, 6 months, 3 months, 1 monthSet to ‘All’ only if you travel offline often. Smaller cache = smaller OST = fewer sync stalls.
Send/Receive GroupsSend/Receive tab > Send/Receive Groups > Define Send/Receive GroupsDefault, Custom groupsDisable ‘Include this group in send/receive’ for archive PSTs. Prevents unnecessary sync triggers.
Offline Folder File SettingsFile > Account Settings > Account Settings > Data Files tab > double-click OST file > SettingsSync schedule, Download headers onlyCheck ‘Download headers only’ for large mailboxes — reduces OST growth by ~70%.
Mailbox QuotasAdmin center (admin.microsoft.com) > Users > Active users > Mail > Mailbox usageWarning, Prohibit send, Prohibit send and receiveIf quota hits warning level, PST bloat gets worse fast. Clean inbox *before* hitting 90%.
Emily Watson

Emily Watson

Emily is an expert in workplace culture and team dynamics. Her articles help professionals navigate interpersonal challenges and build better coworker relationships.