Solution to "TF237055: You cannot destroy a work item type that is being used. Verify that the work item type is not being used in any categories. Operation failed."
1 min read
You’ll often see TF237055 when you try to call destroywitd on a type that is currently assigned to a category. Here’s how to get around that.
TF237055: You cannot destroy a work item type that is being used. Verify that the work item type is not being used in any categories. Operation failed.
```typescript
You need to export your categories, remove the reference to that type and then import the updated categories.
- *1\. Export the categories to a local file.**
```bash
witadmin exportcategories /collection:[url] /p:"[project]" /f:C:\categories.xml
```typescript
- *2\. Remove the reference to the type in the categories file**
(categories with Scenario type referenced – This is the type I was trying to remove)
(categories with the Scenario type removed – Just deleted that line, but your file may have other references to your type so make sure you remove all references)

- *3\. Import the categories file back into TFS**
```text
witadmin importcategories /collection:[url] /p:"[project]" /f:C:\categories.xml
```markdown
- *3\. Rerun destroywitd**
```bash
witadmin destroywitd /collection:[url] /p:"[project]" /n:"[type]"Jon
Share: