.. you can cleanup your nested fragment in the parent fragment's destroyview
method:
@Override
public void onDestroyView() {
try{
FragmentTransaction transaction = getSupportFragmentManager()
.beginTransaction();
transaction.remove(nestedFragment);
transaction.commit();
}catch(Exception e){
}
super.onDestroyView();
}