Stop Closing Outlook to Close a Data File — Try This Instead

The first thing most people do when they need to close an Outlook data file is click the X in the top-right corner and shut down Outlook completely. That’s overkill — and it breaks your cached Exchange connection, wipes your unsent drafts, and forces a full re-sync next time. Worse, some users right-click the Outlook icon in the taskbar and choose 'Exit', thinking that’s safer. It isn’t. You’re not closing a data file — you’re nuking your entire session.

The Problem

Outlook doesn’t let you ‘close’ a data file like a Word doc. It loads them at startup and holds them open until you explicitly tell it to unload. So when someone says “I need to close my archive.pst”, what they usually mean is: • They’re about to run a third-party PST repair tool (like scanpst.exe) and can’t because Outlook has the file locked. • They want to stop syncing a shared mailbox they no longer need. • They’re troubleshooting duplicate calendar entries and suspect a secondary data file is interfering. • Their IT department asked them to detach a legacy archive before migrating to M365. This affects anyone using multiple accounts, local PSTs, shared mailboxes, or delegated folders — especially admins, compliance officers, and finance teams handling sensitive archived email. The issue gets worse in Outlook 365 with Cached Exchange Mode enabled: even if you remove an account from Account Settings, its OST stays mounted and active behind the scenes.

The Fix

You don’t need to restart Outlook. You just need to unmount the data file. Here’s how — step-by-step, for all major versions: In Outlook 365 and Outlook 2019/2016:
  1. Go to File > Account Settings > Account Settings…
  2. Switch to the Data Files tab
  3. Select the data file you want to close (e.g., Archive - Michael Rodriguez.pst)
  4. Click Remove — but wait! Don’t panic. This doesn’t delete the file. It only unloads it from the current Outlook session.
That’s it. The file disappears from your folder pane instantly. No restart required. If you’re managing an OST file (like Outlook Data File (Offline).ost tied to an Exchange account), you can’t remove it directly here — but you can disable Cached Exchange Mode temporarily to force Outlook to release the lock. Go to File > Account Settings > Account Settings… > select your Exchange account > Change > uncheck Use Cached Exchange Mode. Click Next, then Finish. Outlook will prompt you to restart — but only once, and only to reload without the OST. Keyboard shortcut: Press Ctrl+Shift+P to jump straight to the Data Files tab (works in Outlook 365 and 2019; not available in 2016).

If That Doesn't Work

Sometimes the Remove button is grayed out. Or Outlook hangs when you try. Here’s what to try next — ranked by success rate: 1. Close all open message windows first. Even one unsent draft in a different data file can block removal. Hit Ctrl+W to close each open inspector window. 2. Disable add-ins. Go to File > Options > Add-ins, set Manage dropdown to COM Add-ins, click Go…, and uncheck everything. Some archiving or DLP tools (like Proofpoint or Symantec) lock PSTs aggressively. 3. Run Outlook in Safe Mode (Win+R, type outlook.exe /safe). Then repeat the Data Files removal steps. Safe Mode disables all add-ins and customizations. 4. Use Outlook Web App as a workaround. If your goal is to stop syncing a shared mailbox, go to outlook.office.com, click your profile picture > View account > Mail > Shared mailboxes, and toggle off access there. Changes sync back to desktop Outlook within 5–10 minutes. One surprising tip: If you’re trying to close a data file that’s set as your default delivery location (e.g., all new mail goes to Finance Archive.pst), Outlook won’t let you remove it unless you first change the default. Go to File > Account Settings > Account Settings… > Data Files tab > double-click your primary mailbox > under Delivery new messages to:, pick a different data file.

Preventing It Next Time

Don’t wait until scanpst.exe throws an error. Build habits that keep data files manageable: • Set automatic archive rules only on folders you actively use — not your entire mailbox. Right-click a folder > Properties > AutoArchive tab. • Avoid adding PSTs via drag-and-drop into Outlook. Always use File > Open & Export > Open Outlook Data File… so they appear cleanly in the Data Files list. • If your company uses Group Policy to manage Outlook, check whether DisablePST or DisableOST policies are enforced — these can prevent manual removal even if the UI lets you click Remove. Your admin can verify via gpresult /h report.html. • Never store PSTs on network drives. Outlook locks them exclusively, and network latency causes timeouts that mimic ‘file in use’ errors.

Related Settings

Three settings interact closely with data file behavior — tweak them deliberately, not by accident:
Setting Where to Find It What It Does Risk if Misconfigured
Default Delivery Location File > Account Settings > Data Files > double-click primary account Controls where new emails land — critical when removing archives May route incoming mail to a closed PST, causing silent delivery failure
Prompt for Default Data File File > Options > Advanced > Outlook start and exit Asks which PST to load at startup (if multiple exist) Can delay startup by 10+ seconds if unchecked and many large PSTs are present
Allow Multiple Exchange Accounts File > Account Settings > Account Settings > Email tab > click 'Add…' > choose Exchange Enables separate OSTs per account — increases risk of orphaned files Leaves inactive OSTs mounted unless manually removed via Data Files tab
Compact Now (for PSTs) Right-click PST in Folder pane > Properties > Advanced > Compact Now Reclaims disk space and reduces corruption risk Fails silently if file is still open — always close first using Data Files tab
Cached Exchange Mode Account Settings > Change > uncheck 'Use Cached Exchange Mode' Controls whether OST is loaded — disabling releases the lock Disabling mid-day cuts off offline access and delays send/receive
Anna Kim

Anna Kim

Anna specializes in tax forms