TFS - Build Cannot Be Deleted Due To Build History

TFS – Build Cannot Be Deleted Due To Build History

We have many builds that haven’t been run in years. Today I went to clear out some old ones but imminently got this error.

Unable to perform the action requested. Refresh the page and try again. Details: TF215032: Build definition ……… cannot be deleted because builds still exist for this definition. Delete all completed builds for this definition and try again.

After going into the build and deleting the build history. I still got the same issue. After digging about a bit online I found this tool.

Its a really powerful VS tool that enables a variety of options. But most importantly for me, it enabled me to delete build that had massive build histories. Once installed just go to Tools > Community TFS Build Manager. From there you can right click any build and delete it.

Community TFS Build Manager