Umbraco – SQL for Empty recycle bin

Uncomment below to verify the number of nodes returned is the same as the number of nodes that is in the Recycle Bin

-- select * from umbracoNode where path like '%-20%' and id!=-20
-- Delete all 'related' nodes and table contents...
delete from cmsPreviewXml where nodeId in (select id from umbracoNode where path like '%-20%' and id!=-20)

delete from cmsContentVersion where contentId in (select id from umbracoNode where path like '%-20%' and id!=-20)

delete from cmsDocument where nodeId in (select id from umbracoNode where path like '%-20%' and id!=-20)

delete from cmsContentXML where nodeId in (select id from umbracoNode where path like '%-20%' and id!=-20)

delete from cmsContent where nodeId in (select id from umbracoNode where path like '%-20%' and id!=-20)

delete from cmsPropertyData where contentNodeId in (select id from umbracoNode where path like '%-20%' and id!=-20)
-- delete the XML nodes....
delete from umbracoNode where path like '%-20%' and id!=-20