Packets that turn unused opioid painkillers into useless gel are available for free at Walmart pharmacies.

The move is meant to reduce the risk of opioid abuse. About four million Americans are addicted to prescription painkillers, and users often obtain the drugs from the medicine cabinets of family and friends, according to the U.S. Drug Enforcement Agency.

The disposal packets being handed out at Walmart's 4,700 U.S. pharmacies contain a powder that is placed in prescription bottles. When warm water is added, the powder turns opioid pills into a biodegradable gel that can be placed in the garbage, the Associated Press reported.

Walmart will offer a packet every six months to patients with a regular opioid prescription, but pharmacy customers can ask for a free packet at any time.

The disposal packets are made by DisposeRx. The company said the packets can also be used on other prescription drugs and work on pills, tablets, capsules, liquids and patches, the AP reported.

Drug disposal pouches are also offered by painkiller maker Mallinckrodt PLC, which donated about 1.5 million of the pouches across the U.S. last year and will boost the number to 2 million this year.

Some drugstore chains, such as CVS and Walgreens, collect unused medications in many of their stores. Leftover medications can also be taken to hospital pharmacies or police stations, the AP reported.