Typically symptoms of withdrawal from opioid use can last for between a week or two, but this depends on how regularly and for how long you have been taking opioids, as well as your dose. Withdrawal anxiety can be an uncomfortable experience and can make you feel like you want to start taking your prescription again.
In rare cases, the psychological elements of dependency, like agitation, cravings and anxiety, can resurface cyclically for months or even years after cessation. However, for most people this is unlikely and the intense feelings of anxiety associated with withdrawal should be gone within a week or two.