I want to delete the unmanaged code present in my org using salesforce migration tool.While undeploying the components i'm facing a lot of errors like you cannot delete the following components as they are referred in some other components. eg: xyz page is linked with some Custom tab or link . The dependency checker in salesforce doesn't seem to look beyond 1 level deep.
I cannot go and remove every dependency manually.Is there anyway undeployment can be achieved using destructivechanges.xml? Or is there any hierarchy which i should follow to delete the components in multiple steps.