Beware the anybody type triggers, you might end deleting also gamelogics vital for your game. Also, if you delete a vehicle, its crew will be "ejected" from it. So, for each vehicle you should take care to remove its crew first.
I havent tested nested foreach, it is up to you to try it:
{if (typeOf _x != "logic") then {{deleteVehicle _x} forEach crew _x;deleteVehicle _x};} forEach thisList