This came up with a customer of mine and since it gets asked so often, I thought of posting a blog post on how to do it.

CAVEATS:

First of all you should considering adding a state of “Removed” to the WIT. Once you do that you can change the state of the PBIs to Removed (or something similar). The PBI is then still in the system (you can query on them), but they don’t show up on the backlog anymore.

Often times you should never be doing this permanent “DELETE” as WITs that get created should remain traceable in the system for audit purposes and linkages.

STEPS TO DO:

Now on to removing a WIT permanently if that is what you really want. The WIT can be of any type (Product Backlog, User Story, Feature, or plain Task) – it does not matter.   I created a few WITs for deletion and noted their ID. (see below)

image

Next open up a VS (I used 2012) command prompt and run the WITADMIN destroy command as shown below.

image

Now your WITs are no longer in the TFS database. This is a permanent destruction and you should understand the consequences of doing this.

The command to do this is detailed in this MSDN article.

http://msdn.microsoft.com/en-us/library/dd236908(v=vs.120).aspx