> For the complete documentation index, see [llms.txt](https://wiki.owain.codes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.owain.codes/coding/umbraco/delete-items-from-backoffice-by-doctype-id.md).

# Delete items from backoffice by DocType ID

This deletes all content from the Root of the site that has a Document Type ID of 1097.

```
@{
    var contentService = Current.Services.ContentService;

    var RootNode = Model.Root().Children();

    foreach(var node in RootNode)
    {

        contentService.DeleteOfType(1097);

    }


}

```
