The objective of detoxification is to assist the cocaine addict in ending the use of the drug as quickly and safely as possible, in a supervised environment. In some cases, it may be necessary to temporarily substitute another drug (such as methadone) which has fewer side effects.