6

By default if we delete item, it stores into Recycle Bin. This is desire and essential behavior.

enter image description here

But if we want delete item permanently, can we do using any config change?

Please suggest any approach.

8

There is RecycleBinActive setting.

Change it to false and it should do the trick.

Just create a patch file Disable.Recycle.Bin.config and add it to App_Config/Include folder:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:x="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <settings>
      <setting name="RecycleBinActive">
        <patch:attribute name="value">false</patch:attribute>
      </setting>
    </settings>
  </sitecore>
</configuration>
8

We can do this using Sitecore PowerShell Extensions - skip Recycling Bin passing Permanently parameter. This is very fast and easy way.

Below is sample example:

New-UsingBlock (New-Object Sitecore.Data.BulkUpdateContext) {
  Get-Item "master:/content/Something" | Remove-Item -Recurse -Permanently
}

If you're working with a large volume of data. In those cases you might also want to introduce the Sitecore.Data.BulkUpdateContext technique, which will improve performance by avoiding event etc.

Note: Because this does disable events etc. You will probably need to re-index and run a smart publish once the items are deleted.

Please go through link https://doc.sitecorepowershell.com/working-with-items.html for more details .

enter image description here

If we passing Permanently - Specifies the item should be deleted rather than recycled.

4

If you only need to do it occasionally, you can use the good old DB Browser at https://your-sitecore/sitecore/admin/dbbrowser.aspx.

The database browser

2

To do this manually on an occasional basis hold the shift key while pressing the delete key or choosing "Delete" of the context menu.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.