Most diesel engines will tolerate a small amount of petrol so you don't have to get every last drop of diesel out. Rigging up a syphon or a hand pump should be enough. When you have gotten as much petrol as you can out fill the tank with diesel, what every is left of the petrol will mix well with the diesel.
If you ran the engine till it stopped (sucked up some petrol) then you should purge the injection pump before you try and start the engine again.
If you ran the engine till it stopped (sucked up some petrol) then you should purge the injection pump before you try and start the engine again.