Destroy: A new feature for Orcas
Brian Harry mentioned the new Destroy feature in his TFS roadmap post. I thought I would go into a little bit more detail on how destroy works in Orcas. Please do keep in mind that any of this might change / be removed before Orcas ships - so there are no guarantees.
Destroy gives you the ability to permanently delete version control files/folders from TFS. It can also be used to destroy the file contents while preserving the change set history. Destroy can only be invoked from the command line and here is the syntax for the command line:
tf destroy [/keephistory] <filespec1>[;<VersionSpec>] <filespec2 ... filespec3> [/stopat:<VersionSpec>] [/preview] [/StartCleanup] [/i]
All filespecs must be server paths. Local file paths aren’t allowed. Destroy is a very dangerous operation, so removing all possible ambiguity about which items will be destroyed is a good idea. Additionally, the user must posess the AdminProjectRights permission in order to destroy items.
If /keephistory is specified then /stopat becomes optional. /stopat is not allowed if /keephistory is not specified. /stopat is the version including and after that destroy will preserve the file contents for. /stopat defaults to tip (the latest version checked in of an item). The command line does not support version ranges and does support DeletionId version specs (‘X’). When /preview is specified the destroy is not actually committed but the output is displayed any way. /stopat is not allowed to take label or workspace version specs.
TFS stores versioned file content orthogonally from the versioned item histories. Destroy removes all of the non-content data when it is invoked. If you immediately want to have the content garbage collected then you should use the /StartCleanup option to destroy. If /StartCleanup is not specified then the content garbage collection will occur when the TFS database maintenance job runs. The job is scheduled to run one once per day by default.
If you have any additional questions about Destroy, feel free to ask.