You can do that by using some time frequency resolution techniques like wavelet transform and then again filter the desired harmonics from the input signal.......
Your question is not clear enough. If you say "system" it's about a physical object (it could be a network with nonlinear loads which inject higher-order current harmonics), so that you need an active, passive or hybrid filter (to improve the power quality). If you think on a certain digitized signal stored as a vector in your computer, then let use a numerical filter (DFT could be an option).
System mean, "power system"? Then instead of filtering, it would be better to find the cause, and to take care so pure fundamental wave should appear.
Higher working flux density, with the introduction of grain oriented high carbon silicon steel, for core material, of electrical equipment, are the main cause for generation of harmonics. Harmonics can be minimize, if the equipments of the system, are allowed to operate only in linear region, of B-H curve.