DEV Community

Jeroen Fürst for TrueLime

Posted on

How to Delete a Code Wiki in Azure DevOps

In one of my projects, I initially created a Code Wiki next to the regular project Wiki in Azure DevOps, thinking it might be useful, but later realized I didn’t really need it. Everything seemed fine until I decided to clean it up and deleted all the content from the Code Wiki. That’s when things got weird.

Whenever I clicked on Wiki in the left navigation, I ended up on a blank screen where I could only create a new document. After saving it, nothing happened, no navigation options, no way to switch back to my main project Wiki. The only workaround I found was to manually add .wiki to the query string in the URL to reach the regular Wiki again. 🤦‍♂️

Even after digging through Azure DevOps project settings, there was no option to delete or reset the broken Code Wiki from the UI.

After some research, I discovered that you can actually remove a Code Wiki using the Azure DevOps CLI, and that finally solved it. 🚀


🧰 Steps to Delete a Code Wiki

Open your terminal or PowerShell and run the following command (adjust it to your setup):

az devops wiki delete --wiki <wikiName> --project <projectName> --yes
Enter fullscreen mode Exit fullscreen mode

Replace <wikiName> with the name or ID of your Code Wiki, and <projectName> with your Azure DevOps project name (if it’s not already set as default).

The --yes parameter simply skips the confirmation prompt.


⚙️ Installing the Azure DevOps CLI

If you haven’t installed the Azure DevOps extension yet, you can do so in PowerShell with:

az extension add --name azure-devops
Enter fullscreen mode Exit fullscreen mode

You can explore all available extensions using:

az extension list-available --output table
Enter fullscreen mode Exit fullscreen mode

Just sharing this in case anyone else runs into the same problem, hopefully this saves you a few hours of head-scratching. 💡

Top comments (0)