Turn off the hardware first. If you can see that the port is severely clogged, say, with peanut butter or another thick, child-friendly substance, gently dig the gunk out with toothpicks. But remember: Ethernet, serial, and other jacks rely on fragile pins, so try to move in and out on the same path instead of swirling around the sides.

For less sticky situations, use a can of compressed air (actually pressurized gases) to blast out loose bits. These cans sell for £5 to £10 at any computer store. (Keep them away from children: The gases are dangerous to inhale and come out extremely cold.) Fire at the target in short bursts.

Finish cleaning with a cotton swab dipped in rubbing alcohol or electronics cleaner. Leave the device turned off for a couple hours to dry.