Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
How to: Delete a Completed Build (Command-Line)

How to: Delete a Completed Build (Command-Line)

The Team Foundation user interface in Team Foundation Server enables you to delete an already-completed Team Foundation Build. However, you can also use the command TFSBuild delete to delete a completed build and all the files and directories associated with it.

Before you run the TFSBuild delete command, you must have the following information:

  • Name of the team project that contains the solution that was built

  • Build number of the completed Team Foundation Build type you want to delete

  • URL of the Team Foundation computer

Required Permissions

To complete this task, you must have Administer a build permission set to Allow. If the build that is deleted has test results associated with it, you must have Publish test results permission set to Allow. Also, the application-tier service account and the Team Foundation Build service account must have read/write permissions to the build drop location. For more information, see Team Foundation Server Permissions.

The following steps show you how to delete a specific completed build.

To delete a completed build

  1. Click Start, click All Programs, point to Microsoft Visual Studio 9.0, point to Visual Studio Tools, and then click Visual Studio 2008 Command Prompt.

  2. At the command prompt type:

    c:\>TFSBuild delete http://servername:8080 TeamProjectName BuildNumber

    Where the BuildNumber must be enclosed in quotation marks if it contains spaces. The typical format for the BuildNumber is BuildType_yyyymmdd.x, where the yyyy specifies the year, for example, 2010; the mm specifies month, for example, 05; and dd specifies the day, for example, 21. The x specifies the build increment on that day, for example, for the first build of a given date x would be 1. You can also customize the build numbering format. For more information, see How to: Customize Build Numbers.

  3. When you are prompted, type "yes" at the command prompt to start the deletion process. As an option, you can enter the /noprompt option to run the command without prompts.

    All the files and folders created as a part of the build are deleted from the Team Foundation Build computer and from the drop site.

Community Additions

© 2015 Microsoft