Inbreeding is advantageous as well as disadvantageous.Explain

Inbreeding increases homozygosity, and thus inbreeding is necessary for evolving a pure line in any animal.Inbreeding exposes the harmful recessive alleles that are eliminated by selection.
Inbreeding also helps in accumulation of superior genes and elimination of less desirable genes.But continued inbreeding causes in breeding depression, which reduces fertility and even productivity.Under such a situation, the selected animals of the breeding population are mated with unrelated superior animals of the same breed to restore fertility and yield.