Walgreens will limit online orders of children's fever and pain medicine to six items "to help support availability and avoid excess purchases." At CVS stores, purchases will be limited to two.
CVS would pay about $5 billion and Walgreens more than $5.5 billion, though neither company has admitted wrongdoing. States have until the end of the year to accept the terms of the settlement.
It could amount to the last round of huge settlements after years of litigation over the industry's role in an overdose crisis linked to more than 500,000 deaths in the U.S. over the past two decades.