Having moved my Source Control between multiple workstations over time and still having it with my can sometimes present problems with “workspace already exists” and other problems in that category. And that even you can’t see these workspaces mentioned (on your new workstation!).
To clear out workspaces, you first need to gain an overview of what’s currently registered in the database:
- Open a VS Dev Command Prompt on the TFS-server
- Navigate to a folder on disk where you want to see the current workspaces
- tf workspaces /owner:*
- (alternatively the verbose version): tf workspaces /server: ServerName /owner:*
This will give you a list of currently registered workspaces (good and bad ones).
To delete a workspace, you type this:
- tf workspace /delete workspaceName;owner
- (alternatively the verbose version): tf workspace /server: ServerName /delete workspaceName;owner