How to Delete Items in Sitecore CMS

December 2, 2014

Blog | Development | How to Delete Items in Sitecore CMS
How to Delete Items in Sitecore CMS

This is the eleventh in a series of posts about learning how to use and develop for Sitecore CMS; it is the follow-up post to “How to Name Items in Sitecore CMS”. In this “How to” post I will be covering how to delete items as well as how to restore deleted items in Sitecore CMS.

Deleting Items

There are a variety of convenient ways to delete items in Sitecore.

From the Ribbon

Select the item you’d like to delete in the content tree.

Click the “Delete” button in the “Operations” section of the “Home” tab in the ribbon.

Sitecore 8 ribbon showing the delete button on the Home tab
Sitecore 8 ribbon showing the delete button on the Home tab
Sitecore 6 ribbon showing the delete button on the Home tab
Sitecore 6 ribbon showing the delete button on the Home tab

Sitecore will open a dialog to confirm that you’d like to delete the item.

Sitecore 8 delete confirmation dialog
Sitecore 8 delete confirmation dialog
Sitecore 6 delete confirmation dialog
Sitecore 6 delete confirmation dialog

Click OK to delete the item.

From the Context Menu

Right click the item you’d like to delete in the content tree.

Click the “Delete” menu item in the context menu that appears.

Sitecore 8 item context menu showing delete menu item
Sitecore 8 item context menu showing delete menu item
Sitecore 6 item context menu showing delete menu item
Sitecore 6 item context menu showing delete menu item

Sitecore will open a dialog to confirm that you’d like to delete the item.

Sitecore 8 delete confirmation dialog
Sitecore 8 delete confirmation dialog
Sitecore 6 delete confirmation dialog
Sitecore 6 delete confirmation dialog

Click OK to delete the item.

Keyboard Shortcut

Select the item you’d like to delete in the content tree.

Press the Delete key.

Sitecore will open a dialog to confirm that you’d like to delete the item.

Sitecore 8 delete confirmation dialog
Sitecore 8 delete confirmation dialog
Sitecore 6 delete confirmation dialog
Sitecore 6 delete confirmation dialog

Click OK to delete the item.

Tim Leverett

Senior Developer
Tags
  • Sitecore
  • Tutorial
Sitecore Survival Guide Volume 1

If you found this post helpful, there are plenty more where it came from! You'll find the first 10 here.

Download the first 10 posts in our Sitecore how-to series by Developer Tim Leverett!

Deleting Subitems

Select the item you'd like to delete in the content tree.

If the item contains child items a dropdown will be available at the bottom of the delete button in the ribbon.

Click the “Delete subitems” button in the dropdown of the “Delete” button in the “Operations” section of the “Home” tab in the ribbon.

Sitecore 8 delete subitems dropdown

Sitecore 8 delete subitems dropdown

Sitecore will open a dialog to confirm that you'd like to delete the subitems.

Sitecore 8 subitem delete confirmation dialog

Sitecore 8 subitem delete confirmation dialog

Click OK to delete the subitems.

If other items have fields that link to the item being deleted, a “Breaking Links” dialog will appear.

Sitecore 8 breaking links dialog

Sitecore 8 breaking links dialog

The dialog helps to prevent link rot by allowing links to deleted items to be directed to other items. This prevents pages throughout the site from serving broken links after a page is removed.

These breaking links can be:

  • removed
  • linked to another item
  • left alone
  • edited manually

If removed, existing hyperlinks in rich text fields and general link fields will no longer point to the item being deleted, but they won't point anywhere else.

If the links are linked to another item, all existing link references will be updated to point to the new item. This is generally the best option where possible.

If the links are left alone, links across the site may be broken. These broken links will appear in the “Broken Links” report, and can be dealt with manually.

The “Edit Links” button will trigger an “Edit Links” dialog:

Sitecore 8 edit links dialog

Sitecore 8 edit links dialog

The dialog allows each link to be addressed individually. This is helpful if there are only a few links or if different links need to be handled in different ways, such as when a single page is being split into multiple new pages.

Recycle Bin

Just because an item has been deleted doesn't mean that it's gone forever.

Sitecore has a “Recycle Bin”, where deleted items are stored to recover from accidental deletions.

The Recycle Bin can be opened from the Sitecore menu:

Sitecore 8 recycle bin in Sitecore menu

Sitecore 8 recycle bin in Sitecore menu

Sitecore 6 recycle bin in Sitecore menu

Sitecore 6 recycle bin in Sitecore menu

In Sitecore 8, the Recycle Bin can also be opened from the Launchpad:

Sitecore 8 recycle bin on the Launchpad

Sitecore 8 recycle bin on the Launchpad

Restoring

To restore an item from the Recycle Bin, open the Recycle Bin and select the item to restore:

Sitecore 8 recycle bin showing the Home item selected

Sitecore 8 recycle bin showing the Home item selected

Sitecore 6 recycle bin showing the Home item selected

Sitecore 6 recycle bin showing the Home item selected

Click the “Restore” button in the “Items” section of the ribbon.

Sitecore will open a dialog to confirm that you'd like to restore the item.

Sitecore 8 restore confirmation dialog

Sitecore 8 restore confirmation dialog

Sitecore 6 restore confirmation dialog

Sitecore 6 restore confirmation dialog

Click OK to restore the item.

Removing

To permanently delete an item from Sitecore, open the Recycle Bin and select the item to remove.

Sitecore 8 recycle bin showing the Home item selected

Sitecore 8 recycle bin showing the Home item selected

Sitecore 6 recycle bin showing the Home item selected

Sitecore 6 recycle bin showing the Home item selected

Click the “Delete” button in the “Operations” section of the ribbon.

Sitecore will open a dialog to confirm that you'd like to permanently delete the item.

Sitecore 8 remove confirmation dialog

Sitecore 8 remove confirmation dialog

Sitecore 6 remove confirmation dialog

Sitecore 6 remove confirmation dialog

Click OK to permanently delete the item.


Up next: “How to Configure Help Text on Items in Sitecore CMS”

Recent Work

Check out what else we've been working on