Flux helps with heat transfer by scavenging oxides from the bit and joint surface so solder wets both. However just about any flux that's non-corrosive when cold will do and the difference a $30 bottle of flux makes vs a pinch of finely powdered pine rosin wetted with >95% alcohol is absolutely negligible when desoldering through hole parts.
Far Far more important is removing the molten solder quickly and effectively. Too much heat for too long and the pads will come unbonded from the PCB. Also, the switch pins are often very tight in the holes and if its a double-sided board, that vastly increases the risk of pad damage as its all too easy to rip the copper plated lining out of the hole, taking the top-side pad with it. Desolder braid or a pro-grade vacuum desoldering station are your friends here, to clear the holes, then if they have any clearance round the pins, you can check the pins are free by nudging them sideways with a jeweler's screwdriver as they cool to check they haven't re-stuck to the copper lining. If they are snug fits, your options are vey limited: hot air to heat all the pins to solder melting point simultaneously, or break the switch open so you can pull out one pin at a time, or buy ChipQuik low temperature desoldering alloy so you can keep all the joints molten simultaneously with only a soldering iron.