Depending on the extent of your dependency, you may need certain medications to manage physical withdrawal symptoms and cravings. This is common with opioid dependencies where an alternative medication is given that blocks receptors and will allow you to wean yourself off codeine. However, this will be decided by your medical team who will take the best course of action to keep you safe and comfortable during codeine rehab.