Most of the time, the capacitor will discharge within a couple minutes of unplugging the power supply. In some circumstances, usually due to a fault, the capacitor(s) may take much longer to discharge.
I just confirm the voltage with a multimeter to make sure it's discharged, if it needs additional "help" to discharge to a safe level, I just put a 100ohm resistor across the cap.
One point to keep in mind, is that the capacitor in a non-PFC power supply will be charged to roughly the peak voltage of the incoming AC - about 170VDC for a 120VAC input, or 340VDC for a 240VAC input. In power supplies with a PFC pre-regulator, the cap will be charged to about 400VDC regardless of AC input voltage.
The caps on the primary side of a switching supply are not usually very high microfarads, although the voltages can be several hundred volts because they are operating on the rectified AC line voltage (sometimes doubled). However, I wouldn't want to touch one that is fully charged. And I'm not about to try touching one to answer whether or not it is lethal. I recently took a 15 kV hit from a CRT and that was enough excitement for one day.
Plenty enough to be lethal if it goes through the right path - through your heart. One sweaty hand on the negative and the other sweaty hand on the positive of the capacitor would be one of the worst case scenarios.
However, if say one or two fingers on the same hand come across the charged capacitor, it will definitely get your attention but is unlikely to have any serious effects.
No need to be afraid of it though, you just have to be aware the potential hazard exists, and take precautions, like not touching any part of the primary circuit of the power supply until you've verified the capacitors are in fact discharged to a safe voltage. If you must poke around in there while the power supply is energized, or capacitors potentially still charged, keep one hand in your pocket. When doing energized testing/troubleshooting, use a proper isolation transformer.
Generally speaking, you'd probably have to be VERY careless to receive a lethal shock from the stored energy in the capacitors of a powered off switching power supply.