I wanna make sure I have enough info to use the right things to clean it.
I usually just use compressed air to blow out any dust and then spray DeOxy-it into them.
The biggest thing to be aware of is that they are low insertion-count connectors (they are not intended to be used very many times), which means they may be quite fragile. Depending on the support structures, they may have exposed terminals that are effectively rather fine pieces of wire; these are particularly vulnerable to being damaged by force applied perpendicular to their mating surfaces (e.g., scrubbing “across” the slot), or being “sprung open” by inserting something too thick into the slot or pressing them back too hard.
Isopropyl alcohol (you can use the common 80-90%-ish found at grocery stores and pharmacies, but if it’s below about 85% be sure to use heat or low pressure air to dry it out after cleaning) or purpose contact cleaners like Deoxit are appropriate for chemical cleaning, but most other cleaners should be avoided as either corrosion, plastic damage, or nearby component damage possibilities. (In particular, acetone is safe on PCBs but may eat the plastic of the slot, so don’t use it!) You can also use distilled or deionized water, but dry thoroughly afterward to prevent corrosion.
Low pressure air from an air compressor or can of air is great for removing debris. A folded piece of paper or a business card wetted with isopropyl alcohol inserted and removed from the slot in the direction that the RAM would normally be inserted will burnish the contacts slightly, but make sure it’s not too thick (so as not to spring the contacts).
These guidelines are good for almost anything in an old computer. You can use Simple Green, Formula 409, Windex, WD-40, distilled vinegar, and other similar mild cleaners on case and mechanical parts, but test first in an area that doesn’t show in case they cause cosmetic damage or changes.
WD40 does not clean in my view.
Remember both the socket and card need cleaning,
WD-40 absolutely cleans; it’s one of the only things it’s good for. It is a light oil, and will dissolve oil-soluble grime and (in particular) many adhesives.
What WD-40 is not, that many people use it for, is a lubricant. It evaporates and leaves behind waxes and residue that attract dirt without providing good lubrication. It’s a fine penetrating fluid (although for most purposes there are better products), it’s a fine cleaning fluid, and of course it is marketed specifically for drying wet joints of water.
Vinegar should work. Vinegar or vinegar and salt removes green corrosion from circuit board traces (it might also eat a good portion of the trace!). You need to be careful when using any sort of “chemicals”. Everything is a chemical, including water. What I mean here is essentially solvents.
Something I’ve heard from model railroaders: IPA (isopropyl alcohol) is said to be prone to ionize metal, resulting in dirt setting even stronger eventually. According to them, you should use WD-40 for this reason, or, if this is not an option for the waxes included and/or there are concerns for residue, lighter fluid (which is said to be basically the same, less the additives.)
However, if we’re going to use said metal as a conductor anyway… (but the model railroaders are about cleaning their rails, which are also used as conductors.)
Edit: Mind that there are different formulas of WD-40 and some do include actual lubricants. Contact cleaner (or contactspray), however, is not supposed to do so. So mind your can of WD-40.
I suppose that is possible; however, note that most of our small electronics contacts are gold, which is not prone to alteration by cleaning chemicals, while model railroaders are probably dealing with brass, copper, and steel, all of which are quite reactive.
Certainly bare copper contacts cleaned thoroughly with IPA tarnish easily, and benefit from a very light coating of a dielectric grease as would be used on automotive connections. In a computer environment, in a climate controlled machine room, this is not a big problem like it is “in the real world”, of course.
Which is also why we use gold at all. It’s not about the conductivity (gold isn’t the best conductor at all), but all about corrosion.
BTW, when gold was generally used for semiconductor packaging (as in ceramic DIPs), were they expecting the chips to become chemically unstable? (Compare some of the infamous MOS Technology manufactured chips.)