So how do you delete a Team Foundation Server (TFS) Team Project that is no longer needed. It is not immediately obvious, certainly there is no obvious way using the Team Explorer GUI.
The answer is to use the “tfsdeleteproject” command.
Usage: TfsDeleteProject [/q] [/force] </server:<server name>> <team project name> Deletes the Team Project from Team Foundation. To use this command, you must be a member of either the Team Foundation Server Administrators group or a member of the Project Administrators group for the project you are deleting. Use this command with caution because after deleting the team project it cannot be recovered. [/q] - Do not prompt for confirmation. </server:<server name>> - The name of the Team Foundation server. [/force] - Continue even if some data cannot be deleted. <team project name> - The name of the project. Use quotes if there are spaces in the name.
So to delete a project called “Tim2″ you would open up a visual studio command prompt on a machine with Team Explorer installed and type the following:
c:\Program Files\Microsoft Visual Studio 9.0\VC>tfsdeleteproject /server:tfsserver Tim2 Warning: Deleting a team project is an irrecoverable operation. All version cont rol, work item tracking and Team Foundation build data will be destroyed from th e system. The only way to recover this data is by restoring a stored backup of t he databases. Are you sure you want to delete the team project and all of its da ta (Y/N)?y Deleting from Build ... Done Deleting from Work Item Tracking ... Done Deleting from Version Control ... Done Deleting Report Server files ... Done Deleting SharePoint site ... Done Deleting from Team Foundation Core ... Done