I use a can of compressed air spray.
One of my ram slots has failed twice, and both times: I remove the ram, sprayed air with a gusto into the ram slot, wait for any condensation to dry, insert ram, smile.
If you have more than dust in the slot try a coffee filter and soak the corner in isopropyl alcohol and gently rub that in the slot.