Shrink your pst-file or ost-file after cleanup with Compact Now
I have a very large mailbox so I cleaned it up but noticed that the size of my pst-file remained the same. I've already emptied the Deleted Items folder too.
How can I make it smaller?
Pst-files and ost-file are the databases which Outlook uses for storage. Whether a pst-file or ost-file is being used depends on your mail account type and your version of Outlook.
For performance reasons, Outlook doesn’t directly shrink the pst-file or ost-file when you delete something from it. Instead, it will only do this when a certain threshold is reached.
You can wait for this to happen or manually initiate the compact process via Compact Now.
Background info: White space and Auto Compact
As said, when a pst-file or ost-file would grow and shrink with every action you take in Outlook, it would have a negative effect on performance.
To prevent this from happening, the file contains “white space”; Space that can be used by new and modified items. When you permanently delete an item, it will turn into this “white space”.
When more than 20% of the total size of the pst-file or ost-file consists out of “white space” Outlook will automatically shrink the file in the background when your computer is idle. This is the “Auto Compact” process.
Auto Compact vs. Compact Now
When you do a major clean up action, it could very well be that you have over 20% of "white space" in your pst-file or ost-file. Of course you want to directly see the results of your cleanup action and not wait for Outlook to finally shrink the file for you.
Where you can find the Compact Now command for your pst-file or ost-file depends on the mail account type and version of Outlook that you use.
Unlike the “Auto Compact” process of Outlook, which happens in the background, the Compact Now process happens in the foreground. This means that you can’t use Outlook at that time.
Depending on your hard disk performance and how much you have deleted, this process could sometimes last for hours! Therefor, you might want to run this process overnight instead. This is especially true when your pst-file or ost-file is larger than 2GB and you’ve deleted several hundred MB.
Starting the Compact Now process
The easiest way to start the Compact Now process is via the Data Files tab of your Account Settings. This also gives you a nice overview of all the connected Data Files in your Outlook mail profile.
For some accounts and versions of Outlook, you can’t start the Compact Now process this way. These exceptions are discussed in the sections below.
- Open the Data Files tab or dialog.
- Outlook 2007
File-> Data File Management… - Outlook 2010 / 2013 / 2016 / 2019 / Office 365
File-> Account Settings-> Account Settings-> tab: Data Files
- Outlook 2007
- Double click on the pst-file or ost-file that you want to shrink.
- Click the Compact Now button.
After the compacting operation, there will be around 5% “white space” left in the pst-file or ost-file which is needed for performance reasons.
Starting the compacting process manually. Depending on your account type and Outlook version, this dialog may look a bit different for you.
Compact now dialog for Exchange ActiveSync (EAS) accounts.
Exchange accounts (ost-files)
When you are using an Exchange account, you can use the same steps as indicated above and then additionally require the following clicks to get to the Compact Now button:
- Outlook 2007
Select the Advanced tab-> button: Offline Folder File Settings… - Outlook 2010 / 2013 / 2016 / 2019 / Office 365
Select the Advanced tab-> button: Outlook Data File Settings…
Compact Now location for Exchange accounts.
Alternative: Rebuild ost-file for Exchange account
An alternative would be to rename the ost-file for your Exchange account from .ost
to .old
when Outlook is closed. When you then start Outlook again, the ost-file will be recreated as Outlook downloads and caches the entire mailbox again.
The location of the ost-file for Outlook Hotmail Connector accounts is shown on the Data File tab. The default location for the ost-file is:
C:\Users\%username%\AppData\Local\Microsoft\Outlook