A function to delete a fork from a trajectory