whats a good way to clean dirt, grime and contacts in USB ports and pen drives or anything that uses USB, this applies to type "A" and "C" mostly
usb ports and pen drives are extremely prone to failure. so instead of trying to clean them, just replace them with new ones.
Careful insertion and removal typically is good enough. However, unused computer ports can really get gummed up - especially if the cooling is not set up properly and you don't have a little positive (over) pressure inside the case. If you have any negative (under) pressure, dust and grime will be sucked "in" through every crack and crevice, and unused port. Not good. With slight over, the vast majority of the dirty incoming air comes in only through the intake fan vents which, hopefully, are filtered. I recommend powering down and unplugging the computer from the wall to remove all voltages. Then blast the computer ports with some quality electrical contact cleaner. I recommend using CRC QD Electronic Cleaner or WD-40 Electrical Contact Cleaner. Typically, the power from the spray is enough for most cleaning jobs. But if the dirt is stubborn, I spray it with the contact cleaner then give it a soft scrub with a acid brush. Then spray it again to let the dirt and grime drip away.