Geeks With Blogs
Visual Studio ALM Blog by Jahangeer

If you are working with TFS, sometimes you may require to remove the team projects which are no longer required.

You can do this in two ways in TFS 2010.

Delete the TFS Team Project using TFSDeleteProject:

The first one is using TFS Delete Project Command line tool. You can find this in Drive:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE on any client computer that runs Team Explorer.

To use the TFSDeleteProject command, you must be a member of the Team Foundation Administrators security group or the Project Administrators security group.

Also please note that TFSDeleteProject permanently destroys the team project, after which it cannot be recovered. You should backup all important project data before using TFSDeleteProject (if needed).

 

TFSDeleteproject [/q] [/force] [/excludewss] /collection:URLTeamProjectName

 

Below are parameters that need to be specified as per the requirements:

Option

Description

/q

Optional. Use the quiet mode. Do not prompt the user for confirmation.

/force

Optional. Specifies that the deletion process should continue even if some components cannot be deleted.

/excludewss

Optional. Specifies to not delete the SharePoint site that is associated with the team project. Specify this option to maintain the existing site so that other team projects can continue using it.

/collection:URL

Required. Specifies the URI of the team project collection. You must use the following format for the URI: http://ServerName:Port/VirtualDirectoryName/CollectionName

If you do not specify a virtual directory, you must use the following format for the URI:

http://ServerName:Port/CollectionName.

TeamProjectName

Required. The name of the project. If the name includes spaces, enclose it in quotations marks.

 Now, I want to delete the OMG Team Project from my TFS Server.

  

I am running TFS delete project command line tool using VS command prompt. It will also prompt for confirmation.

 

Done. Now, as you can see below Team Project OMG is completely deleted from my TFS Server.

 

Delete the Team Project using TFS Administration Console:


I have created the same team project ‘OMG’ again. Now, I will delete this project again using TFS Administration Console.

You can open the TFS Administration console from Start menu -->Microsoft Team Foundation Server 2010 -->Team Foundation Administration Console.

 

Choose the OMG Team Project from New Collection and Click delete.

It open the Delete Team projects window, here you can choose to remove the external artifacts like SQL Server Reporting Services and Lab Management artifacts associated with these projects.

You can also choose to delete the Workspaces the associated with this Team Project.

Note that Project portals will not be removed for SharePoint Web Application; you have to do it manually.

As you can see below, the Team Project ‘OMG’ is deleted from Team Project Collection again.

 

 

Posted on Saturday, June 26, 2010 11:32 PM Team Fondation Server | Back to top


Comments on this post: How to delete a Team Project in TFS 2010:

# re: How to delete a Team Project in TFS 2010:
Requesting Gravatar...
Its really useful to know many things in TFS
Left by Sthanu Subramaniyan on Jul 27, 2010 5:17 PM

# re: How to delete a Team Project in TFS 2010:
Requesting Gravatar...
This is great I was lost until then :)
Left by Ricolo on Mar 16, 2011 2:24 AM

# re: How to delete a Team Project in TFS 2010:
Requesting Gravatar...
thx, good info.
Left by TfsGuy on Jul 21, 2011 3:20 PM

# re: How to delete a Team Project in TFS 2010:
Requesting Gravatar...
You are deleteing a team project not a collection. Title misleading.
Left by Marshall on Oct 11, 2011 12:22 AM

# re: How to delete a Team Project in TFS 2010:
Requesting Gravatar...
Thanks, I couldn't delete with the VS command prompt but with the second way it works. Command prompt says Administration permission is required but I don't know how to provide it!
Left by saman on Feb 11, 2012 11:02 PM

# re: How to delete a Team Project in TFS 2010:
Requesting Gravatar...
AWSOME tutorial!
Left by User on Sep 28, 2012 6:15 PM

# re: How to delete a Team Project in TFS 2010:
Requesting Gravatar...
For those of you with a 64-Bit OS, you may need to specify a different "Program Files" folder. After searching for the tfsdeleteproject command I figured it out. My example went as follows:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE>tfsdeleteproject /collection:http://tfs.mycompany.com:8080/tfs/TFS2008CollectionName "SharePoint Component Name With Spaces"

Thanks for the tutorial!!!
Left by TFS Guy on Nov 16, 2012 2:38 AM

# re: How to delete a Team Project in TFS 2010:
Requesting Gravatar...
Thanks a lot.
Left by Bharath S on Apr 09, 2013 5:40 PM

# re: How to delete a Team Project in TFS 2010:
Requesting Gravatar...
Thanks, good info!
Left by Scott Szathmary on Jun 20, 2013 9:21 PM

# re: How to delete a Team Project in TFS 2010:
Requesting Gravatar...
Thank you so much sir
Left by Alam on Aug 14, 2014 12:30 PM

# re: How to delete a Team Project in TFS 2010:
Requesting Gravatar...
Thanks for this. Searched for the solution for this for a while until THIS. Bookmarking.
Left by CJ on Mar 11, 2015 5:52 PM

# re: How to delete a Team Project in TFS 2010:
Requesting Gravatar...
Hi,

How to restore the same deleted project in same collection in future if need arises?
Regards,'
Jai
Left by jai on Jan 16, 2017 2:04 PM

Your comment:
 (will show your gravatar)


Copyright © Jahangeer | Powered by: GeeksWithBlogs.net