Tuesday, June 8, 2010

Tip for cleaning out Outlook PSTs

So, a typical scenario in the business world (when working with email pack rats - you know who you are) is that Outlook (any version) uses a PST file to store your emails.  This happens when the people who setup outlook at your company give you a limit on how much space can be used up by your emails, you hit that limit, and then you decide to "Archive" your emails.  At that point, all emails that are older than a certain date get moved into a single file called a PST file (because it ends in .pst) and is placed somewhere (probably in your documents, on a network drive - which isn't really all that supported by Microsoft I don't think, or in an obscure folder in your computer like C:\Documents and Settings\YourUsername\Local Settings\Application Data\Microsoft\Outlook or something like that.

Well, you mosey along with your archiving, thinking the world is your oyster, until you hit the next big problem:  PSTs shouldn't go over 2 Gb (that's "giga-bytes") in size.  How do you know if your PST is too big?  Open up your outlook, right-click on your "Personal Folders" or whatever they are called, left-click "Properties", and then left-click "Folder Size".  This will come up and tell you your size in KBs...every 1000 KBs is a Mb (Mega byte) and every 1,000,000 KBs is a Gb.  If you are over 2 million KBs then you have drastically improved your chances of that PST file BREAKING HORRIBLY.  So, how do you clean your PST emails so that you can bring that size down?  There are a few ways:

1. Open your personal folders in outlook and look at that folder size thing again...look at which folders hold the most stuff and then go open that folder.  When you so, you can sort your emails by SIZE instead of by DATE RECEIVED.  To do this in Outlook 2007, simply left-click the top of the small window where you see your list of emails and then click "Size" (also, make sure to click the bottom part that says "Show in Groups" if you don't already have that option checked).  This will let you look at your biggest emails - probably ones with huge attachments like pictures of someone's dog...get rid of these emails by holding the SHIFT key and pressing the DEL key on your keyboard.  This will permanently delete that email.

2. Let's say you see a bunch of emails in that folder that need to be deleted...here's a way to select more than one:  hold down the CTRL key and just keep left-clicking the emails you will delete and, after you have selected several, let go of the CTRL key and then hold down the SHIFT key and press the DEL key.

3. Let's say you realize that you just have way too many emails, most are several years old, and you just don't care any more with the exception of certain words or phrases in the emails.  Here's what you can do:
  • Create a new PST file by clicking File->New->Outlook Data File and choosing where the PST file should go
  • Go left-click your Personal or Archive folders and then click the View menu -> Current View -> Define Views
  • Click the "New..." button, give this new view a name like "Test View", choose "All Mail and Post Folders" at the bottom, and click OK
  • Click the Fields button and start left-clicking anything on the right that is not FROM, SUBJECT, RECEIVED, ATTACHMENT, and SIZE and click OK
  • Click the Filter button - this is where you can add special filters to only show you certain emails (like ones with special keywords or are a certain size or between certain dates).  You can even use SQL (pronounced "seek-wool") to search for emails if you want to (but that's for advanced users, so let's go with simple...if you want to edit the SQL, set some settings first and see what SQL is generated in that tab by Outlook so you can get a feel for the field types)
  • In the first box (Search for the word(s)) type in any special words that you think are important - separating them by commas - and choose "In subject field and message body" for the second dropdown.  This will search for any of these words in your emails period.  This should be enough for you to narrow down what you want so click "OK" (If you need more specific stuff, like all those keywords but only from certain people, you could click the From boxes or Sent To or whatnot)
  • Click OK again and click "Apply View" to see what this view looks like on the folder you have selected.  If you need to look at that same view in another folder, you can just click that folder, click the "View" menu, and choose your view...just remember to switch it back when you are done, otherwise you might mess yourself up in the future when looking at that folder :)
  • Now that you are seeing the emails you want, you can select them all and cut-n-pasting them to your new Personal Folders you created at the beginning.  Once you have copied all the emails you want to keep, delete the PST file from Outlook and then from wherever it was being stored because you don't need those old emails anymore.  Congratulations - you have just purged your Personal Folders.
  • If you need further help with this idea, just email me or comment.