In my article Project Setup in VSTS 2008, I shared how to setup a project in TFS 2008. One of the common problems and concerns is project deletion on Team Foundation Server. In this article, I am going to share how to delete a project on TFS.
How to Delete
TFS does not provide any User Interface to delete a project. A project can only be deleted using a command line tool / utility.
With the deletion of a project, TFS removes the reference of the project from TFS along with the SharePoint site for the project and the reporting services site that gets created when a project is created on TFS.
Note that with the deletion of project from TFS, the project information is actually not removed from the database. So once a project is deleted, the same project name cannot be used to create another project as the project information is never deleted from the database.
To delete a project, Open up the command prompt in the server, move to the location “C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\”. The location can vary based on your installation. Check for the file "tfsdeleteproject.exe".
Then run the command:
tfsdeleteProject /q /force /server:<server> [servername] [team project name]
- /q: Silent installation. No prompt
- /force: If data can't be deleted, still continue
- /server: your TFS server<team>: Name of the Team Project to delete. If there are spaces in the name, use quotes.
Refer to the following screenshot. The name of my Team Foundation Server is Sepat (name of a fish in Malaysia) and DemoSetup is the name of my project that I wanted to delete.
Once the project is deleted, the confirmation is shown as visible in the above screenshot.
As a word of caution, please be absolutely sure before deleting a project as on TFS when a project is deleted, it cannot be retrieved unless you restore the TFS data warehouse which is a collection of SQL Server Databases where TFS stores project information from the pre-deletion backup set.
In this article, I have discussed how to delete projects on Team Foundation Server.
To learn more about the features of VSTS and TFS, please refer to the following URL:
- 19th August, 2009: Initial post