The LISA Pathfinder charge management device was responsible for neutralising the cosmic ray induced electric charge that inevitably accumulated on the free-falling test masses at the heart of the experiment. We present measurements made on ground and in-flight that quantify the performance of this contactless discharge system which was based on photo-emission under UV illumination. In addition, a two-part simulation is described that was developed alongside the hardware. Modelling of the absorbed UV light within the Pathfinder sensor was carried out with the GEANT4 software toolkit and a separate MATLAB charge transfer model calculated the net photocurrent between the test masses and surrounding housing in the presence of AC and DC electric fields. We confront the results of these models with observations and draw conclusions for the design of discharge systems for future experiments like LISA that will also employ free-falling test masses.