---
title: "Delete an item and its descendants"
slug: "delete-an-item-and-its-descendants"
abstract: "How to delete an item and its descendants using the Sitecore.Data.Items.Item.Delete method."
---
# Delete an item and its descendants

You can use the `Sitecore.Data.Items.Item.Delete` method to delete an item and its descendants. For example, to delete the `/Sitecore/Content/Home/Sample` item in the Master database:

```

Sitecore.Data.Database master = Sitecore.Configuration.Factory.GetDatabase("master");

Sitecore.Data.Items.Item sample = master.GetItem("/sitecore/content/home/sample");

sample.Delete();

```

> [!note]
> The `Sitecore.Data.Items.Item.Delete()` method deletes the item and all of its descendants.

> [!note]
> You cannot delete items that are stored in resource files. If you have copied an item from a resource file to the database, Sitecore deletes it from the database and restores it from the resource file.