Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Outlook Compact Data Files: What They Are & How to Use Them

· 5 min read · Home Tech

In this article
  1. What Are Outlook Data Files?
  2. Why Compact a Data File?
  3. How to Compact a PST or OST File
  4. When Should You Compact?
  5. Common Misconceptions and Pitfalls
  6. Alternatives to Compaction
  7. Frequently Asked Questions

Outlook compact data files are a built-in maintenance feature that shrinks the size of your Outlook data files (.pst and .ost) by removing unused space left behind when you delete or move emails. You trigger it manually through the Account Settings dialog, and it can free up significant disk space and improve performance, especially on older or heavily used mailboxes. This article explains what compaction does, why it matters, and how to do it safely.

What Are Outlook Data Files?

Outlook stores your emails, calendar entries, contacts, tasks, and other items in a data file. There are two main types:

  • PST (Personal Storage Table): Used with POP3 and IMAP accounts (and for archiving). This file lives on your computer and is what you typically back up.
  • OST (Offline Storage Table): Used with Exchange, Microsoft 365, and Outlook.com accounts. It's a cached copy of your server mailbox, so you can work offline. It's automatically recreated if deleted.

Both file types can grow large over time. When you delete an item, Outlook doesn't immediately shrink the file; it just marks the space as available. Over months, this leaves many small gaps, making the file bloated and slower to read. Compaction is the process of rewriting the file, packing the remaining data together, and discarding the empty space.

Why Compact a Data File?

The primary reason is to reclaim disk space. A 5 GB PST with 2 GB of deleted items might compact down to 3 GB. This is especially important if you're close to your storage limit or if your PC has a small SSD. A secondary benefit is performance: a fragmented, bloated file can slow down searches and folder operations. Compaction doesn't delete any of your current items—it only removes the unused gaps. It's a safe, Microsoft-supported maintenance task.

How to Compact a PST or OST File

The steps are identical for both file types in Outlook 2013 through Microsoft 365. Here's the process:

  1. Open Outlook and go to File > Account Settings > Account Settings.
  2. Click the Data Files tab. You'll see a list of all your Outlook data files with their names and locations.
  3. Select the file you want to compact, then click Settings.
  4. In the new window, click Compact Now.
  5. Outlook will show a progress bar. The time depends on the file size and your disk speed—it can take several minutes for a large file. You can continue using Outlook, but it's best to let it finish.

After compaction, the file size on disk will shrink. You can verify by checking the file's properties in Windows Explorer (right-click > Properties).

When Should You Compact?

There's no set schedule, but a good rule of thumb is to compact when:

  • You've deleted a large number of emails or emptied the Deleted Items folder.
  • Your PST or OST file has grown close to the 50 GB limit (for PST) or you notice Outlook slowing down.
  • You're about to back up the file—a smaller file backs up faster.

For most users, doing it once or twice a year is enough. If you use auto-archive, you might want to compact after the archive runs. There's no harm in compacting more often, but it does take time and causes a brief performance dip during the process.

Common Misconceptions and Pitfalls

Many users confuse compacting with deleting. Compacting does not remove any emails, contacts, or calendar items—it only removes the empty space. Another misconception is that compacting an OST will reduce your server mailbox size; it won't—the OST is just a cache, and the server still holds all your data. Also, compacting a PST does not reduce the size of your mailbox on the email provider's server (for IMAP or POP, the server is separate).

A common pitfall is trying to compact a file that's in use by another process (like a search indexer). If you get an error, close Outlook and try again. Another issue: if your PST is very large (say, 40+ GB), compaction might take a long time and require free disk space roughly equal to the current file size (because it creates a temporary file). Ensure you have enough free space before starting.

Alternatives to Compaction

If your data file is still huge after compacting, consider these options:

  • Archive old items: Use AutoArchive or manually move old emails to a separate PST. This reduces the main file size.
  • Empty the Deleted Items folder: This is the most common cause of bloat. Right-click the folder and choose "Empty Folder."
  • Run the Inbox Repair Tool (scanpst.exe): If the file is corrupted, compaction won't fix it. The repair tool is located in the Outlook installation folder (e.g., C:\Program Files\Microsoft Office\root\Office16).
  • Recreate the OST (for Exchange accounts): If your OST is bloated, you can delete it and let Outlook rebuild it from the server. This is a more drastic step but can fix sync issues.

Frequently Asked Questions

Does compacting delete my emails? No. It only removes unused space. Your emails, contacts, and other items remain untouched.

How often should I compact my Outlook data file? There's no rule, but a good practice is to compact after you delete a large number of items or when you notice the file size is much larger than the actual data. For most, once or twice a year is sufficient.

Why is my PST still large after compacting? Compaction only removes empty space. If you have many large attachments or a long history, the file will naturally be large. Consider archiving old items to a separate PST.

Can I compact an OST file? Yes, the same steps work. However, if the OST is corrupted, compacting won't fix it—you may need to delete it and let Outlook rebuild it.

What's the difference between a PST and an OST? A PST is a personal storage file used for POP/IMAP or archiving; an OST is a cached copy of an Exchange/Microsoft 365 mailbox. Compacting works the same for both.

Will compacting speed up Outlook? It can, especially if the file was heavily fragmented. But if Outlook is slow due to a large mailbox, archiving or reducing the number of items is more effective.