We present temperature-dependent measurements of the dephasing time in the ground-state transition of strongly-confined InGaAs quantum dots, using a highly sensitive four-wave mixing technique. At low temperature we measure a dephasing time of several hundred picoseconds. Between 7 and 100 K the polarization decay has two distinct components resulting in a non-Lorentzian lineshape with a sharp zero-phonon line and a broad band from elastic exciton-acoustic phonon interactions. We also explore the dephasing time beyond the one exciton occupation, by electrically injecting carriers. Electrical injection into the barrier region results in a dominantly pure dephasing of the excitonic ground-state transition. Once the injected carriers have filled the electronic ground state, additional filling of the excited states creates multiexcitons that show a fast dephasing due to population relaxation.