I was surprised to learn that AutoZone has vacuum pumps and manifold gauges under their Loan-A-Tool program. If you know how to do it, that's a huge deal! Flushing is NOT recommended unless you know exactly what you're doing and have a machine that costs a fortune.
Flushing is easy, just blow compressed air through to get flush out. Just about any solvent is OK, I have used mineral spirits, but you can buy specific flush aerosol cans. Turn compressor by hand. Let it all dry out good. Works best to have all the parts disassembled. Then assemble with new O-rings, and make sure to oil the O-rings, and then pull the vacuum for around 1 hour to get any moisture out. Then pull vacuum again, shut it off and see if it holds. If good, then put new oil in (assuming you flushed compressor). Pull vacuum again and then charge up using gages. The key is to pull good vacuum for the 1 hour so any residual moisture or solvent will evaporate and will be sucked out.