We report an experimental study of the effect of fiber length and laser linewidth on self-pulsing dynamics and output stabilization of a single-mode Yb-doped double-clad CW fiber laser. It is found that initiation of self-pulsing under low-level pumping conditions is due to relaxation oscillations and saturable absorption in the weakly pumped region of the doped fiber, irrespective of the fiber length and the laser linewidth. However, with an increase in pump power, depending on fiber length and laser linewidth, the pulses initiated due to relaxation oscillation get amplified, and result in short-duration giant pulses due to either stimulated Brillouin scattering (SBS) or stimulated Raman scattering (SRS). In the case of fiber lasers that employ a broadband mirror and wherein the fiber length is sufficient to reach the SRS threshold, the giant self-pulses are generated by SRS, whereas in the case of fiber lasers using a fiber Bragg grating, characterized by narrowband reflection and with sufficient fiber length to reach the SBS threshold, the giant self-pulses are generated by SBS. Output stabilization and, hence, elimination of self-pulsations can be achieved either by suppressing the relaxation oscillations with the addition of an appropriate length of a passive fiber to sufficiently increase the cavity photon lifetime, or by increasing the pump power to achieve gain uniformity along the doped fiber such that relaxation oscillations and reabsorption effects are suppressed.