Deleteing a Team Project from Team Foundation Server
Wednesday, October 21, 2009 2:38:00 AM
I was playing with Team Foundation Server 2008 today and created a Team Project as an example. This was a project I didn't need and was one I needed to delete. I quickly realized that TFS doesn't allow you to truly delete a Team Project from the UI. However, they do offer a command line utility for this. (As a side note, TFS offers a command line utility for almost everything you want and/or need to do).
If you don't have a Visual Studio Command Prompt available on the server, simply open a normal command prompt and run the utility. The tool is located in "<root install drive>:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\".
"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\TfsDeleteProject" /server:YourTfsServerNameHere YourTeamProjectNameHere
Once you run the tool, you will see the following prompt:
Warning: Deleting a team project is an irrecoverable operation. All version control, work item tracking and Team Foundation build data will be destroyed from the system. The only way to recover this data is by restoring a stored backup of the databases. Are you sure you want to delete the team project and all of its data (Y/N)?
Type y and the process will start:
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