Clean old and unused workspaces and shelves from your TFS
The command line utility "tfsclean.exe" helps with two scenarios:
- You want to find and delete old worspaces and shelvesets (oder than XX days).
- You want to find and delete workspaces and shevlesets from a certain user
(e.g. when the user left the company)
Caution: There's no way to recover a shelveset once it is deleted.
tfsclean.exe /collection<URI> [/delete] [/maxage:n] [/username:text] [/excludeworkspaces] [/excludeshelvesets]
|Required parameters: || |
|/collection:<URI> ||URI of Team Project Collection (e.g. http://servername:8080/collection) |
|Optional parameters: || |
|/delete ||Required to actually delete items (otherwise it runs in readonly mode) |
|/maxage:<number> ||Specified the maximum age in days (default is: 365) |
|/username:<name> ||Only clean items from specified user (e.g. DOMAIN\username) |
|/excludeworkspaces ||Do not clean workspaces. |
|/excludeshelvesets ||Do not clean shelvesets. |
(Note: The user needs to have the 'Administer workspaces' and 'Administer shelved changes' permission on TFS)
Download the tool from here: TfsClean.exe (.ZIP, 4,87 KB)
Prerequisite: This tool requires Team Explorer 2010 to be installed.