An arrangement of pills of the opioid oxycodone-acetaminophen is displayed Aug. 15, 2017, in New York. (AP Photo/Patrick Sison)

(AP) — Walmart is helping customers get rid of leftover opioids by giving them packets that turn the addictive painkillers into a useless gel.

The retail giant said Wednesday that it will provide the packets free with opioid prescriptions filled at its 4,700 U.S. pharmacies.

The small packets, made by DisposeRx, contain a powder that is poured into prescription bottles. When mixed with warm water, the powder turns the pills into a biodegradable gel that can be thrown in the trash.

The move by Walmart is the latest precaution being taken to cut down on opioid abuse. Around 4 million Americans are addicted to prescription painkillers, according to the U.S. Drug Enforcement Administration. The agency says these drugs are often obtained from friends and family who leave them in home medicine cabinets.

Research has shown that surgery patients often end up with leftover opioid painkillers and store them improperly at home. Authorities say opioid painkillers should be kept in their original packaging and locked inside a cabinet out of the reach of children.

DisposeRx says its disposal packets also work on other prescription drugs and for pills, tablets, capsules, liquids or patches.

Walmart says its pharmacy customers can request a free packet at any time. The company also will offer a packet every six months to patients with a regular opioid prescription.

Painkiller maker Mallinckrodt PLC has a similar program. It said last fall that it has donated about 1.5 million drug disposal pouches across the country and will increase that total to 2 million early this year.

Some drugstores chains like CVS and Walgreens also collect unused medications at many of their stores. People can also take leftovers to hospital pharmacies or police stations.

Unused prescriptions also can be thrown in the trash. But the U.S Food and Drug Administration recommends mixing them first with something unpalatable like Kitty Litter or used coffee grounds and then sealing the mixture in a plastic bag.