remove dependencies and profiles that are no longer needed