The combination of ledipasvir and sofosbuvir is used alone or in combination with ribavirin (Copegus, Rebetol, Ribasphere, others) to treat certain types of chronic hepatitis C (an ongoing viral infection that damages the liver) in adults and children 3 years of age and older.