I’ve been using TFS “preview” for a while now for my personal projects. Naturally as a dev starts using a new service we pretty much just go hog wild clicking stuff, turning things on, naming stuff, and adding things to it – well, I do anyway.
This tends to, however, leave a pretty good mess by the time you’re done. So… after poking around the TFS website I couldn’t find anywhere to delete projects that I had created. On the home screen there are “X”s beside each project, but that just removes them from the “quick list” that shows up there – it doesn’t delete them from the service. So… what to do next?
Did some sleuthing and discovered the easiest way to do this is via the command line. As a preface, I have logged in to my TFS account on the web, and have already attached to it in VS (though did not have VS running at the time) so I think one or both of those nails down the authentication that makes the following possible.
Fire up the VS Command Prompt from your start screen:
at the prompt that follows, simply type:
tfsdeleteproject /collection:https://[youraccount].visualstudio.com/DefaultCollection “[TFS Project Name]”
tfsdeleteproject /collection:https://contoso.visualstudio.com/DefaultCollection “Awesome Windows8 Project”
and voila, it’ll roll through removing it from your TFS Cloud account. The interesting thing to note is that the project you delete will NOT remove itself from that quick list that opens on your home page, though – so you’ll have to take care of that manually.
Enjoy a clean TFS account again, now that you’ve got it all figured out.