Electrolytic capacitors are very popular for use in the dc-link in power electronics applications and especially in renewable energy systems. However, their life expectancy and reliability can be severely affected by the ripple in the capacitor current that can cause increased thermal stresses. Further, the switching of the power electronics switches and the presence of harmonic components can increase the ripple in the capacitor current worsening the life expectancy. This paper proposes the use of a shunt active filter to maintain an almost constant dc-current in the capacitor and hence to mitigate the events that can cause the capacitor life expectancy to reduce. This filter reduces the ripple current irrespective of the frequency spectrum. The design principle and the resulting operating condition have also been derived. The results from simulation studies using Matlab/Simulink and the experimental results from a laboratory prototype have demonstrated the effectiveness of the proposed technique.