How to delete TFVC repository in Azure DevOps?

Apparently, deleting TFVC repository is not allowed once it has been created.

Source: MSDN forum's answer from Microsoft staff.


When a Team Project is created as a TFVC based project, the repository is part of the "key infrastructure". The repository cannot be deleted, but it can be destroyed.

tf vc destroy $/TestProject

The UI doesn't always completely understand what happened after you have executed this command, some parts will still show the repo due to the fact that the Team Project knows it should have a repository with the same name.

Once destroyed the repository cannot be recreated. This is a one-time action.

If you've made the move to Git, you can always perform a mirror clone and push the complete repository to a new Team Project. You can move the work items to another project as well. Build definitions and Release Definitions can be exported+imported.

It's usually not worth it though.