Delete Command (Team Foundation Build)
The delete command deletes a specified completed build.
Required Permissions
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 Team Foundation Server Permissions.
TFSBuild delete Teamfoundationserver TeamProject BuildNumbers [/noprompt]
Parameters
Argument | Description |
---|---|
Teamfoundationserver |
The Team Foundation server URL. |
TeamProject |
The team project name for which this build exists. |
BuildNumbers |
The build or builds which must be deleted. If the build number has spaces, this number must be provided within single quotes. |
Option | Description |
---|---|
/noprompt |
Do not prompt when deleting a build. |
Remarks
Delete process
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.
Event log
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.
Example
The following example deletes the build number 99 from the AdventureWorks team project on server01.
>TFSBuild delete https://server01:8080 AdventureWorks 99
See Also
Tasks
How to: Delete a Completed Build
How to: Create a New Build Type
Other Resources
Team Foundation Build Commands
Running Builds in Team Foundation Build
Working with Build Types in Team Foundation Build