Delete Command (Team Foundation Build)
The delete command deletes a specified completed build.
To run the delete command, the account requesting the delete operation must have Administer a build permission set to Allow. If the build that is deleted has test results associated with it, the account must have Publish test results permission set to Allow. Additionally, 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.
The Team Foundation server URL.
The team project name for which this build exists.
The build or builds which must be deleted. If the build number has spaces, this number must be provided within single quotes.
Do not prompt when deleting a build.
The following processes are required for each build number being deleted:
A check is made to ensure the build number is valid and this build is not in progress.
Contents of the build store and drop site are deleted if the requestor has ‘Administer Build’ permission.
The drop location is cleared of the binaries from this build. If a failure occurs during this process, you are prompted with a warning message; however, the deletion is considered successful.
No data is deleted from the warehouse.
Multiple builds being deleted
If multiple builds are specified, a failure in deleting one of the builds does not stop the process. The command continues deleting the other builds after providing a build deletion failure error message.
Build deletions are logged in the event log. The log will have information about who deleted the build, the time when the build was deleted, and the build number.
The following example deletes the build number 99 from the AdventureWorks team project on server01.
>TFSBuild delete http://server01:8080 AdventureWorks 99