[AgeStore] Clearing old debugging symbol files from downstream symbol store

About AgeStore

It’s a good habit to clear out old symbol files. Debugging tools for windows comes with a built in tool which help us do this. The tool is named ‘AgeStore’.

AgeStore executes in three modes…

  • -date=mm-dd-yy    – deletes all files that were last accessed before the specified date.
  • -days=xx                – deletes all files that were last accessed before today minus the amount of days specified by ‘xx’.
  • -size=xx                 – deletes files in order of last access time (oldest first), until all the files in the directory total to the amount of bytes specified by ‘xx’.

There is a caveat when running this command on vista and later. On Vista and later by default “Last Access Time” is disabled, since AgeStore works on “Last Access Time” the tool will fail. Use fsutil command to turn on “Last Access Time” feature, as follows…

E:>fsutil behavior set DisableLastAccess 0
DisableLastAccess = 0

This will turn on last access feature. Please note if this feature was off by default, you’ll not see any old files (based on access) since you turned on last access feature just now. So you’ll have to leave this feature on and then later run the AgeStore command.

Note also that if you run the AgeStore command, the default action is to delete files unless, please be very careful. AgeStore can be used on any folder, not just on symbol folder.

AgeStore Help Text
E:>Agestore

agestore [pathspec]

Deletes all files from a directory based on the last access time of the files.
[pathspec] defines the root path and file specification.
The default is all files in the current working directory

It runs in one of these modes...

-date=mm-dd-yy    - deletes all files that were last accessed before the specified date.
-days=xx          - deletes all files that were last accessed before today minus the
                    amount of days specified by 'xx'.
-size=xx          - deletes files in order of last access time (oldest first), until all the
                    files in the directory total to the amount of bytes specified by 'xx'.
-size             - lists the amount of bytes in the directory.
-lat=<on off>     - toggles filesytem support for last-access-time.

These other command line switches alter the behavior of the program.

-l                - list files only, don't delete
-s                - include subdirectories.
-k                - keep empty subdirectories - normally they are removed.
-q                - quiet mode stops listing of files as they are deleted.
-y                - eliminates the (y/n) prompt.
-r                - deletes RO files

This program deletes files.  You should run agestore with the -l switch
to see what it will delete, before actual usage
Sample Commands
  • The following command lists all symbols older than the given date
    AgeStore e:pdbsymbols -date=07-08-13 -s –l
  • The following command list all pdb files older than the number of days given below
    AgeStore e:pdbsymbols -days=60 -s –l
  • The following command deletes files in order of last access time (oldest first), until all the files in the directory total to the amount of bytes specified by the parameter passed to –size command.
    AgeStore e:pdbsymbols -size=8000000 -s -l
    <snip>
    10375868360 bytes would be deleted
    4336640 bytes would remain
  • The following command lists the amount of bytes in the directory.
    AgeStore e:pdbsymbols -size -s

Appreciate your comments...