Replacement of brake fluid is made similar to pumping of the brake system. You carry out pumping until only new brake fluid follows from final valves.
Old brake fluid is much more dark, than new therefore it is easy to distinguish them.