Skip to content

Outlook keeps a full copy of your mailbox in one file

The OST can reach tens of gigabytes and one setting controls it. Where it is, how to shrink it, and what compacting actually does.

5 min read

Outlook in cached mode keeps an offline copy of your mailbox in a single .ost file. On an account with years of mail and attachments it is regularly the largest single file on a work machine.

Finding it

Get-ChildItem "$env:LOCALAPPDATA\Microsoft\Outlook" -Filter *.ost -EA SilentlyContinue |
  Select-Object @{n='GB';e={[math]::Round($_.Length/1GB,2)}}, Name, LastWriteTime
Get-ChildItem "$env:USERPROFILE\Documents\Outlook Files" -Filter *.pst -EA SilentlyContinue |
  Select-Object @{n='GB';e={[math]::Round($_.Length/1GB,2)}}, Name

OST and PST are not the same thing

FileWhat it isIf you delete it
.ostA cache of a mailbox that lives on the serverRebuilt by resyncing
.pstAn archive that exists only on this PCGone permanently

That distinction is the whole risk here. An OST is disposable because the server has the mail. A PST is not, and it is where people put mail they wanted to keep out of the mailbox quota.

The setting that controls the size

File, Account Settings, Account Settings, double click the account. The slider under Offline Settings decides how much mail is kept locally: one month, three months, a year, or everything. Reducing it is the change that shrinks the file, and everything older stays on the server and is still searchable there.

Why the file does not shrink on its own

Deleting mail marks space inside the file as free without returning it to the disk, in exactly the way a virtual disk does. Compacting is what returns it:

  1. Empty Deleted Items and the Junk folder.
  2. File, Account Settings, Account Settings, Data Files.
  3. Select the file, Settings, then Compact Now.
  4. Leave it to finish. On a large file this takes a while and should not be interrupted.

If it is a shared or old machine

A PC that several accounts have signed into keeps an OST per account, and removing a mail profile does not always remove its file. Those are pure leftovers, and they are the same pattern as everything else an uninstall leaves.

Common questions

Where is the Outlook OST file on Windows?

In %LOCALAPPDATA%\Microsoft\Outlook. PST archives default to a folder called Outlook Files under Documents, and the two are very different things.

Can I delete the OST file?

Yes. It is a cache of a mailbox that lives on the server and Outlook rebuilds it by resyncing. Never delete a .pst, which exists only on that PC.

How do I make the Outlook OST smaller?

Reduce the offline period in Account Settings, empty Deleted Items and Junk, then use Compact Now from the Data Files tab. Mail older than the period stays on the server and remains searchable there.

Why does the OST stay large after deleting mail?

Because deleting marks space free inside the file without returning it to the disk. Compacting is the step that gives the space back.

Read next