I need to delete a TFVC repository in Azure DevOps, but there seems to be no option to allow me to do it. The only TFVC repository (which I just created) seems to not even have a drop-down menu:
In contrast, in the same project, Git's repositories have a "Delete Repository" option in the drop-down menu:
Any ideas?
From the repo drop-down, select Manage repositories. Select the name of the repository from the Repositories list, choose the ... menu, and then choose Delete repository. Confirm the deletion of the repository by typing the repo's name and selecting Delete.
Team Foundation Version Control (TFVC) is a centralized version control system. Typically, team members have only one version of each file on their dev machines. Historical data is maintained only on the server. Branches are path-based and created on the server.
Open Project settings>Repositories. For example, Choose (1) Project settings, (2) Repositories, and then (3) the TFVC repository labeled with the name of the project. Next, choose the user or security group you want to change permissions.
Use the tf destroy command to destroy, or permanently delete, version-controlled files from Team Foundation version control. The destroy action cannot be reversed. You must not destroy files that are still needed.
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.
Apparently, deleting TFVC repository is not allowed once it has been created.
Source: MSDN forum's answer from Microsoft staff.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With