Summarize this article:

If you need to get your system clear of cocaine, stop using the drug right away. One-time users will have cocaine in their urine for at least 4-8 hours afterwards, but cocaine can still be detected for up to 4 days even after a single use. However, habitual users can show up positive on a drug test for up to a month. The sooner you stop using, the sooner you’ll be clean. ” Anyone who uses cocaine will likely have a comedown or “crash” after the initial effects of the drug wear off. This is your body rebalancing itself in terms of energy and mood. Expect to be tired and potentially depressed for a short time, even up to 2-3 days. The cocaine crash is not the same thing as withdrawal, though there are some overlapping symptoms. If you’ve been using cocaine regularly, you will probably experience symptoms of withdrawal when you remove it from your life. Tell yourself ahead of time that you will get through it, and prepare yourself mentally to experience any of the following:  Severe cravings Nausea and vomiting Paranoia, depression, or anxiety Mood swings or irritability Itching or a feeling that something is crawling on your skin Insomnia, sleeping too much, or vivid and distressing dreams Fatigue and exhaustion If you’ve been using cocaine for a long time or using it often, you may need to go through medically-supervised detoxification. There’s no drug that can remove cocaine from your system, but a medical professional can help you through withdrawal by giving you medications to counteract the withdrawal symptoms. If you need help, look online for a detox center near you.  Depending on your symptoms and how heavily you used cocaine, a detox program can last from 3 days to over a week. An inpatient rehabilitation program can last around 30 days. Outpatient detox can cost you between $1,000-1,500, whereas a full rehab program can cost up to $20,000. There’s no great way to flush your system of cocaine and its metabolites (what your body turns it into), so you may just have to wait it out. If so, know that how long cocaine takes to leave your system depends upon a number of different factors:  How much you used: More cocaine takes longer to leave. How often you use it: The more often you use, the longer it lasts in your body. What was mixed with the cocaine, i.e. how pure it was: Purer cocaine leaves more drug in your body. If you were also drinking alcohol: Alcohol slows down elimination of the drug at first, keeping it in your body longer. How well your liver and kidneys function. If you have liver or kidney problems, your body won’t clear cocaine as effectively as in a healthy person. Your weight: Cocaine sticks around longer in heavier individuals.
Stop using cocaine immediately. Anticipate the “comedown. Prepare for withdrawal symptoms. Go into a detox program. Wait.