Delete Another User’s Workspace in TFS

I’ve run into this problem several times. A build blows up for some reason and creates an orphaned workspace. Other builds then fail with the message The path […] is already mapped in workspace […].


The way that I’ve dealt with this in the past is to simply delete the workspace, which you can do easily enough by using the tf workspace command.

tf workspace /delete someworkspace;somedomain\someuser

When you run the command, you’ll be warned that deleted workspaces cannot be recovered and prompted to confirm.


Type “Yes” and the deed is done. Run another build, and you should be good!



Author: Adam Prescott

I'm enthusiastic and passionate about creating intuitive, great-looking software. I strive to find the simplest solutions to complex problems, and I embrace agile principles and test-driven development.

One thought on “Delete Another User’s Workspace in TFS”

  1. I found a third party tool that can delete multiple work spaces called Team Foundation Sidekick from Attrice Corporation. I have used it to clean up work spaces of former employees and even current employees that have invalid work spaces because of new computers. The tool queries the TFS database using a few parameters and returns the results in a grid.

Leave a comment

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: